Director

Dirty Rects

When using a Canvas renderer, it may be a good idea to redraw only scene affected areas instead of the whole frame. CAAT will take of this automatically by calling director.setClear( CAAT.Foundation.Director.CLEAR_DIRTY_RECTS );.

CAAT can automatically identify what objects are dirty, based on Behavior application, position change, etc. But in case you want an Actor to be repaint when dirty rects are enabled, a call to actor.invalidate();.

Dirty rects are specially suited for low-end mobile devices and canvas rendering. Unfortunately, dirty rects can result in no advantage if there're too many on-screen areas affected. It is your responsibility to switch from CLEAR_DIRTY_RECTS to CLEAR_ALL and viceversa. This can be done at any given moment, no need to restart CAAT at all.