Skip to main content
Inspiring
Feb 23, 2016 11:36 PM UTC
Question

cacheAsBitmapMatrix not working anymore?

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 is closed to new replies. Start a new post to keep the conversation going.

13 replies

Colin Holgate
Inspiring
Feb 24, 2016 12:21 AM UTC

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

Translate
Inspiring
Feb 24, 2016 2:21 AM UTC

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.

Translate
Inspiring
Feb 24, 2016 2:40 AM UTC

I am also getting similarly undesirable results from

bg.cacheAsBitmapMatrix = bg.transform.concatenatedMatrix;

bg.cacheAsBitmap = true;

Just to try to be thorough.

Translate