[webkit-dev] Reorganization of animation starting

Nándor Huszka hnandor at inf.u-szeged.hu
Wed Apr 17 01:27:28 PDT 2013

Hi All,

There is an optimization problem related to animations.
If we have one out of the visible viewport, it is still animated.
(Try to scroll down on http://philbit.com/animatedgiftest.html)
In this case it would be good to stop, then continue animations when it is

Now a BitmapImage's animation is started (continued) when it is drawed,
and animation does not stop until it is destroyed.
If animation starting would be handled separately from drawing, we could
start and stop it when it is needed.

Under https://bugs.webkit.org/show_bug.cgi?id=112327 there is a
preliminary patch for it.
The main idea in a nutshell: remember every animation in FrameView
(instead of painting it),then only resume ones are on the visible
viewport. For more details please check the bug.

Reorganizing animation starting raises an important question.
I plan to modify every ports' code where startAnimation is called, because
after this patch it would be FrameView's role.
If we would rename startAnimation to continueAnimation it could help with
finding code points where startAnimation are called and should be removed
by investigating EWS build logs.
On the one hand it would be a more expressive name for that the method does.

What do you think about the conception and about the method renaming?


More information about the webkit-dev mailing list