Hello.

I know there are different people asking this question on the web:
"Why are Animated GIFs (and Marquee, and probably also Blink) disabled
into the Android WebView?".

I digged into the C++ and the Java side: clearly the WebPreferences
object that is used to configure the WebView doesn't expose all the C+
+ interface, where a method to "enable" the feature is in place.
My first reaction is a reasoning: probably there is some performance
issues, so they prefer to loose this small thing...

Even though I don't really see where a user could run a page with a
GIF "so much" to drain the battery and "overtake the CPU", I assumed
that the Googlers know better then me.

But then I discovered something funny: the Google Apps for Mobile, on
startup, they have a "busy animated icon". How they do that?

I faked the User-Agent from Firefox and, with the great Firebug,
caught the small piece of code that does the trick. It's a "CANVAS".
This means that the animation is programmed in Javascript. Ok.

Now my question is: isn't this approach of doing the animation worse
than doing with an Animated Gif?
I mean, I could understand that clearing and re-drawing a small part
of the browser buffer repeatedly (with a GIF) can be "cpu-bound" for a
mobile device (even thought I do the same thing on S60 device and I
never had this impression at all, even with other WebKit based
browsers).
BUT, that' the question, isn't it even more CPU-bound doing it with
Javascript?
The redrawing is there anyway.
And there is also the computation of the Javascript.

With a normal GIF, a lot of optimization in this are made inside the C+
+ part: here is all left to Javascript.

I hope a Google could answer this question.

Cheers

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to