     stats.stagingBitmapsCreated++
 
     stagingBitmap ||= @bitmapFactory.newBitmap targetSpaceDrawArea.size
-    # throw new Error "stagingBitmap too small" unless stagingBitmap.size.gte targetSpaceDrawArea.size
-
-    # @log _renderStagingBitmap:
-    #   element:@inspectedName
-    #   stagingBitmap_size:stagingBitmap.size
-    #   elementToTargetMatrix:elementToTargetMatrix
-    #   targetSpaceDrawArea:targetSpaceDrawArea
 
     @_currentDrawTarget = stagingBitmap
     @_currentToTargetMatrix = elementToTargetMatrix


  @_cachingDraws: 0

  @getter
    cacheDrawRequired: -> @getNeedsStagingBitmap() || (config.drawCacheEnabled && Element._cachingDraws == 0 && @getCacheable() && @getCacheDraw())
    cacheIsValid: -> !!@_drawCacheBitmap
    needsStagingBitmap: ->
      (@getHasChildren() || @getIsMask()) && (@_compositeMode != "normal" || @_opacity < 1 || @getChildRequiresParentStagingBitmap())

    # override this for elements which are faster w/o caching (RectangleElement, BitmapElement)
    cacheable: -> true

      @_clipDraw null, stagingBitmap, elementToTargetMatrix
    else
      @_drawChildren stagingBitmap, elementToTargetMatrix, true

    stagingBitmap

