     ###
     source:
       default:    null
-      validate:   (v) -> !v || isString v
+      validate:   (v) ->
+        !v ||
+        (isImage v) ||
+        (isString v)
+
       postSetter: (v) -> v && @_loadBitmapFromSource v
 
     ###


    # OUT: promise.then (bitmap) ->
    get: (url, initializerPromise) ->
      @_referenceCounts[url] = (@_referenceCounts[url] || 0) + 1
      out = @_cache[url] ||= initializerPromise || Canvas.Bitmap.get url
      out.then (bitmap) => @_loaded[url] = bitmap

{ceil, round} = Math
{defineModule, inspect, min, max, bound, log, createWithPostCreate, isString, isNumber, BaseObject, isPlainArray, timeout} = Foundation
{point, rect, Matrix, point0, point1} = Atomic
{isImage} = Canvas

defineModule module, class BitmapElement extends ShadowableElement

