[webkit-reviews] review requested: [Bug 84620] [chromium] accelerated animations on backgrounded tabs should still tick without the threaded compositor. : [Attachment 138818] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 25 08:37:42 PDT 2012


vollick at chromium.org has asked	for review:
Bug 84620: [chromium] accelerated animations on backgrounded tabs should still
tick without the threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=84620

Attachment 138818: Patch
https://bugs.webkit.org/attachment.cgi?id=138818&action=review

------- Additional Comments from vollick at chromium.org
tl;dr - when requesting a composite in single threaded mode, if we don't
successfully schedule a composite, and we really need one (i.e., we have an
animation to tick), then schedule one manually.

For this to work scheduleComposite needs to return a bool. Since changing the
return type would break the API and make it tricky to roll WebKit, I have
instead added bool tryScheduleComposite() to the API, and once chromium is
using this API function, scheduleComposite will be removed. I have renamed
scheduleComposite tryScheduleComposite throughout the code both for consistency
and because the new name is clearer and suggests that it returns a boolean.

The chromium side of this fix is in
https://chromiumcodereview.appspot.com/10227004. Ticking on background tabs
will not happen in single-threaded mode until it lands.

With this change, we are also able to enable the single-threaded flavor of the
animation unit tests (yay!).

It will also allow DumpRenderTree to use threaded animations without the
threaded compositor!

This change also makes a significant optimization. Previously, we set
needsAnimateLayers = true at every commit because we _might_ have added an
animation. This is overkill and forces us to walk the layer tree checking for
animations when there may be none. LayerChromium now notifies CCLTH that it
needsAnimateLayers when it adds an animation (and this setting is propagated to
CCLTHI as appropriate). The result is that needsAnimateLayers is only true when
we actually have animations to tick.


More information about the webkit-reviews mailing list