Vote for a new cacheAsBitmap behavior ! by Thibault Imbert

As I said the other day, the current cacheAsBitmap behavior has a few drawbacks which makes it nearly unuseful. As you know, the biggest problem of cacheAsBitmap is that the cached bitmap gets updated in memory everytime you modify it. In fact, only a translation on x and y axis does not update the cached bitmap in memory. A great addition in a future player would be locking the cached bitmap update in memory when the cached DisplayObject is modified.

The idea could be something like :

DisplayObject.cacheAsBitmap ( redraw:Boolean=true );

We could get huge performance improvements in terms of rendering in many cases, from game development to complex websites.

Please vote for a new cacheAsBitmap behavior, Flash Player engineers are listening ;)

Comments (18)

  1. Tek wrote::

    It isn’t democratic, I really want to vote against, just to add a little fun to my day ! :)

    I of course have voted for.

    Thursday, November 27, 2008 at 1:32 am #
  2. maroo wrote::

    how about this:

    DisplayObject.cacheAsBitmap = true;
    DisplayObject.bitmapCacheMethod = BitmapCacheMethod.ALWAYS;

    Thursday, November 27, 2008 at 4:18 am #
  3. Thibault Imbert wrote::

    Hi maroo,

    Yes this is a good idea !

    Thibault

    Thursday, November 27, 2008 at 4:24 am #
  4. Daryl Teo wrote::

    Ah! At first I was a little confused… why would you lock the cached bitmap in memory when the DisplayObject changed. Then I read your rasterizing article and I realised that that IS what you want to do.

    Rasterizing to a animated PNG would be great too, but I guess 1 thing at a time :)

    Thursday, November 27, 2008 at 5:08 am #
  5. Macaca wrote::

    I like maroo’s idea:

    DisplayObject.cacheAsBitmap = true;
    DisplayObject.bitmapCacheMethod = BitmapCacheMethod.ALWAYS;

    But then add some more fancy bitmapCacheMethod’s .. like BitmapCacheMethod.TRANSLATE_ONLY, BitmapCacheMethod.SMOOTH etc.

    Thursday, November 27, 2008 at 12:27 pm #
  6. Pleh wrote::

    Voted :) I like maroo’s idea too.

    Thibault, Did you get my email the other day about Icon rendering?

    Thursday, November 27, 2008 at 2:54 pm #
  7. Thibault Imbert wrote::

    Hi Pleh,

    Yes ! I have to take a look at it again. I will get back to you soon !

    best,

    Thibault

    Friday, November 28, 2008 at 3:57 pm #
  8. Pleh wrote::

    Thanks, I was afraid it may have been junked :)

    Friday, November 28, 2008 at 5:13 pm #
  9. Robin Lambell wrote::

    Voted :)

    So what are you calling this one? “Adobe Make Some Bitmaps and leave them alone?”

    Saturday, November 29, 2008 at 2:52 am #
  10. Thibault Imbert wrote::

    haha Robin,

    Do not tempt me ! :)

    Saturday, November 29, 2008 at 2:55 am #
  11. Wilfrid wrote::

    Yes, We Can! ;)

    Saturday, November 29, 2008 at 8:17 pm #
  12. Adriaan wrote::

    great proposal, I’ve voted +1!

    Tuesday, December 2, 2008 at 4:43 pm #
  13. Pure wrote::

    Great idea

    Wednesday, December 3, 2008 at 2:04 am #
  14. Alama wrote::

    Yes!! Je vote également! ;)

    Un paramètre “autoRefresh” serait le bienvenu.

    Sunday, December 21, 2008 at 4:16 am #
  15. Elliot Geno wrote::

    YES YES YES!

    I have had to write my own cacheAsBitmap feature to get around this!

    Friday, January 30, 2009 at 12:51 am #
  16. Davide wrote::

    Great idea! Please, imlpements that feature. Moreover, general pixel/line hardware acceleration should be implemented. I see a lot on interest in stage hardware acceleration (not only the video/movie) the acceleration should take care of blitting too. If you place multiple effect on the same stage, the movieclip slowdown in some cases.

    Thank you
    Best regards

    Friday, January 14, 2011 at 4:32 pm #
  17. Gary Paluk wrote::

    I also like Maroos implementation, however setting DisplayObject.cacheAsBitmap = true / false is unneccessary if you also have:

    DisplayObject.bitmapCacheMethod = BitmapCacheMethod.NEVER;

    Gary Paluk

    Wednesday, January 19, 2011 at 1:09 am #
  18. FLASHMAFIA wrote::

    YES

    Monday, August 20, 2012 at 1:57 pm #

Trackback/Pingback (1)

  1. Use cacheAsBitmap correctly - or not at all « Bagonca on Friday, April 17, 2009 at 7:29 pm

    [...] Vote for a new cacheAsBitmap behavior! [...]