Monday, November 2, 2009

Incubator GWTCanvas - theoretically faster to Clear() between draws?

Hiya,

Apologies if this has been asked, a quick search didn't net me
anything. I have been playing around with the Incubator GWTCanvas and
think it's fantastic. I have a decent little functioning framework
now, and have begun to wonder about optimisation.

My question is, if failing to Clear() the canvas between redraws
(frames) causes the new image to be printed on the old image, is it
theoretically more computationally expensive for each pixel of the
second frame to be printed, even if they contain no transparency (full
alpha)? I can see this happening at a base level due to some kind of
alpha diff taking place, though without understanding the
implementation I can't decide whether calling Clear(), filling the
canvas with white/black, or just painting over the old image would be
the fastest.

I don't know if it's likely to affect my performance, but I am aiming
for up to 20 frames a second on a 760x400 canvas, and would like to
make it as easy as possible for the browsers to do their part.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate