         @renderId = 0
         @renderListPosition = 0
         @rendering = false
-        @setImmediate(cb)
+        @defer(cb)
 
       return
     enqueue(@renderId)
     return
+
+window.Painter = Painter; 
      f(context2d, @renderCtx)
    return

  render: (context2d, cb)->
    unless @ready
      throw new Error('Painter not yet ready.')
    @rendering = true


  ###
   * @param {Array} renderList
   * @param {Function} defer
  ###
  constructor: (@plan, @defer)->
    @renderId = 0
    @ready = false
    @renderCtx =
