Skip to main content
February 13, 2011
Question

CacheAsBitmapMatrix bug?

  • February 13, 2011
  • 3 replies
  • 1535 views

Hi.

I've been testing some features of Air for android using the latest version of flash CS5 / AIR for android ext and found this unexpected behavior when testing on a device.

I have a small testing project, this first two rows of graphics (the cats and the rats) are movie clips containing simple vector graphics (no filters).

The difference between them:

Cats:

Left: a movieclip, on stage (using the ide) with a scale (x/y) of 150% + caching by code.

Middle: same as the left cat but without caching.

Right: a "prescaled" movieclip on stage (using the ide) with a scale (x/y) of 100% + caching by code (I simply scaled the elements within the mc).

Rats:

Left/Middle: same as left and middle cats, but with a scale of 230% [both x and y].

Right:  a scaled movieclip inside an empty container mc, created by code. inner mc scale = 230%, outer mc scale = 100%. caching of outer mc.

Note: by "caching" I mean using both cacheAsBitmap = true AND CacheAsBitmapMatrix = new Matrix();

On the computer, using the flash ide/AIR debug  launcher:

no problems (but it doesn't support CacheAsBitmapMatrix so it's not a fair test).

On the device (samsung galaxy s, 2.2, latest air runtime):

when building for CPU, cache as bitmap matrix results with pixilated graphics for mc that are scaled, even when the caching is done on the object after it is scaled (the texture is always created from the 100% mc graphics).

when building for GPU, cache as bitmap matrix results with distorted graphics (it seems that the gpu texture is not in the right size or something).

But, if I stop using CacheAsBitmapMatrix and use only cacheAsBitmap, all of this graphic weirdness disappears...

Any thoughts?

This topic has been closed for replies.

3 replies

Participant
March 2, 2011

Hi Barak

This appears to be a bug, could you please file one so we can look into it?

Thanks,
David Knight
Adobe Engineering

Participating Frequently
March 3, 2011

You can log bugs here: https://www.adobe.com/go/wish/

Participant
April 10, 2011

Bug filed.

Participant
March 1, 2011

I am having the same problem. With my Samsung Galaxy S. Android 2.2 with latest Air.

Its annoying, and I cant understand what is going on.

Inspiring
February 15, 2011

Any chance you could get hold of a different model of phone, for comparison? An HTC or Motorola?

Also, are the giant GPU cat and the missing GPU rat the only ones which are actual 'bugs'? i.e. are the rest working as expected, but just rendering badly?

I'm just asking from the point of view of whether it's breaking your game, or just spoiling your graphics?!

In my experience, resizing apps on the device at runtime is problematic . I found I had to prepare my graphics as close to the size they were going to be in the fnal product, even for vectors (which kind of defeats the object).

Nick