Reputation: 7219
I am trying to optimize the following method
public function update() : void {
if (_player.playing && !_player.paused) {
bitmapData.lock();
bitmapData.fillRect(_clippingRect, 0);
bitmapData.draw(_player.container, null, null, null, _clippingRect);
bitmapData.unlock();
invalidateContent();
}
}
Can anyone tell me if perhaps using copypixels or some other method might optimize the update function?
Upvotes: 0
Views: 1437
Reputation: 13
Use copyPixels() method instead of draw(). These links should help you
Display list vs. blitting - the results!
Upvotes: 1