MULTI-BUFFERING
Screen Buffer —> To another BmpData via copyPixels
Layer1 extends BitmapData (with many this.copyPixels for this layer locally)
Layer2 extends BitmapData (with many this.copyPixels for this layer locally)
Layer3 extends BitmapData (with many this.copyPixels for this layer locally)
Layer4 extends BitmapData (with many this.copyPixels for this layer locally)
Screen Buffer copyPixels from Layer 1 to Layer 4
-OR-
DOUBLE BUFFERING
Screen Buffer —> To another BmpData via copyPixels
Layer1 (with buffer.copyPixels for this layer…)
Layer2 (with buffer.copyPixels for this layer …)
Layer3 (with buffer.copyPixels for this layer …)
Layer4 (with buffer.copyPixels for this layer )…
for this layer… by having variable ‘this’ passed from Screen Buffer
Screen Buffer updated remotely from Layer 1 to Layer 4 already.
No doubt, double-buffering might seem faster because you are running the copyPixels command less in total. The thing is: Could it be slower because you are copying pixels using a remote reference of a parent as the destination bitmapdata? Is there a significant performance different between this.copyPixels vs parent.copyPixels??? After all, in multi-buffering, all copyPixels command are done locally using this.copyPixels(), it does feel somewhat neater.