I think that the benefits of double-buffering in flash may be different than 
the 
traditional use cases. Of course we dont have to worry about the screen refresh 
in flash so its not about co-ordinating with the vblank.

what i think could be the benefit (and im really just guessing, but i cant 
think 
of much else ;) is that if you draw direct to the screen then you are 
generating 
more dirty rectangles for the renderer, whereas if you just draw to an 
offscreen 
bitmap and then swap that in, you just get the one blit. So there is probably a 
point where the cost of traversing the dirty rectangle list and doing seperate 
renders outweighs the cost of doing one big render offscreen and blitting that 
across.

like i said, im just guessing, but it would be interesting to try and setup 
some 
test cases for comparison.

as for an implementation, just setup 2 bitmaps, one onscreen and the other 
offscreen. draw to the one offscreen and then swap them around.


Austin Haas wrote:
> My understanding is that true double buffering is impossible in Flash. There
> would have to be support for it in the player. Environments that support
> double buffering usually either have a mechanism explicitly built in, or they
> at least allow you to draw to the screen between screen refreshes, so that
> you can avoid problems like tearing. I don't believe there is any way to get
> around tearing in Flash until they build in double buffering support.
> 
> -austin
> 

-- 
Martin Wood

http://relivethefuture.com/choronzon

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to