Skip to main content
Inspiring
February 23, 2016
Question

cacheAsBitmapMatrix not working anymore?

  • February 23, 2016
  • 1 reply
  • 1418 views

So, I used to think I had this working, but maybe I didn't.  I have a vector background that I want to cache for performance reasons.  My big issue is how to get my background image cached on iOS while still anti-aliasing it.

If I do the following, I take no hit on the Display List in Scout, but the image is aliased:

bg.cacheAsBitmap = true;

bg.cacheAsBitmapMatrix = new Matrix();

It's pretty much the same effect as just having cacheAsBitmap on.

If I do the following, I take a 7% hit on the Display List in Scout, but I do get it anti-aliased:


var matrixOpt:Matrix= new Matrix();

matrixOpt.scale(2,2);

bg.cacheAsBitmapMatrix = matrixOpt;

bg.cacheAsBitmap = true;

That performance hit is barely better than if I didn't do anything to the movieclip.

Does anybody know how to do this properly?  I would love to use this feature.  But right now, I think i'm doing it wrong.

Thanks!

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
February 24, 2016

What render mode are you using, and what do you have stage quality set to?

Inspiring
February 24, 2016

Thank you for the quick response. 

I'm in GPU mode. And I'm rendering at HIGH quality due to the other vector stuff I'm animating which I won't be caching.

Also, I'm noticing that my first scenario ( bg.cacheAsBitmap = true; bg.cacheAsBitmapMatrix = new Matrix(); ) is turning out like my second scenario after the playhead moves around on the timeline a bit, complete with the (desired) anti-aliasing and (undesired) performance hit.

Inspiring
February 24, 2016

I am also getting similarly undesirable results from

bg.cacheAsBitmapMatrix = bg.transform.concatenatedMatrix;

bg.cacheAsBitmap = true;

Just to try to be thorough.