 
   # used for internal validation, uncomment body to help debug
   _validateCacheByteSize: (context) ->
-    # @validateCacheByteSize context
+    @validateCacheByteSize context
 
   canUseBitmap: canUseBitmap = (cachedBitmap, requestedSize) ->
     if cachedBitmap?

    }


  @getter "cacheByteSize unusedCacheByteSize",
    currentFrameNumber: -> @_currentFrameNumber
    recycleableSortedCacheBitmaps: ->
      recyclable = []
      currentFrameNumber = @_currentFrameNumber
      @_cachedBitmaps.forEach (v, k) ->
        recyclable.push v if v.lastFrameUsed < currentFrameNumber - 1

      recyclable.sort (a, b) -> a.lastFrameUsed - b.lastFrameUsed

  # called by Element#_clearDrawCache
  doneWithCacheBitmap: (element) ->
    # @_validateCacheByteSize "doneWithCacheBitmap start"
    if cachedBitmap = mapRemove @_cacheBitmaps, element
      cachedBitmap.elementDoneWithCacheBitmap()
      byteSize = cachedBitmap.getByteSize()
      # console.error "doneWithCacheBitmap recycling for #{cachedBitmap.element?.inspectedName} bitmap = #{cachedBitmap.bitmap.size}"
