Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Issue 11783037: Not for review: Enable accelerated animations for orphaned layers (Closed)

Created:
7 years, 11 months ago by ajuma
Modified:
7 years, 9 months ago
Reviewers:
jamesr
CC:
chromium-reviews, cc-bugs_chromium.org, darin-cc_chromium.org, Ian Vollick
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Not for review: Enable accelerated animations for orphaned layers. This will actually need to land as multiple CLs. The planned approach is: 1) (chromium) Make LayerTreeHost::animateLayers take a wall clock time in addition to a monotonic time, just like LayerTreeHostImpl::animateLayers already does (this will be needed in step 3 when LayerTreeHost::animateLayers needs to generate events). In preparation for step 2, define a version of WebLayerTreeViewImpl::updateAnimations that takes a wall clock time in addition to a monotonic time. 2) (WebKit) Make WebLayerTree::updateAnimations take a wall clock time in addition to a monotonic time. Define a method WebViewImpl::registerForAnimations(WebLayer*) that calls a new method WebLayerTreeView::registerForAnimations(WebLayer*). Make GraphicsLayerChromiumFactory call WebViewImpl::registerForAnimations when creating graphics layers. 3) (chromium) Define WebLayerTreeViewImpl::registerForAnimations. Define a method LayerAnimationController::hasNonOrphanedObserver to allow us to identify LayerAnimationControllers that belong to orphaned layers. Change cc::Layer::addAnimation so that animations can be added whenever the layer has an AnimationRegistrar. Change cc::LayerTreeHost::animateLayers so that events are generated when calling |animate| on LayerAnimationControllers belonging to orphaned layers (that have waited for at least one layout to complete). BUG=129683

Patch Set 1 : Original approach #

Patch Set 2 : Modified approach #

Patch Set 3 : Wait for layout to complete before starting orphaned animations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -30 lines) Patch
M cc/layer.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer.cc View 1 2 2 chunks +7 lines, -14 lines 0 comments Download
M cc/layer_animation_controller.h View 1 2 3 chunks +18 lines, -0 lines 0 comments Download
M cc/layer_animation_controller.cc View 1 2 3 chunks +16 lines, -0 lines 0 comments Download
M cc/layer_animation_value_observer.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_impl.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M cc/layer_tree_host.h View 1 2 3 chunks +4 lines, -2 lines 0 comments Download
M cc/layer_tree_host.cc View 1 2 3 chunks +26 lines, -8 lines 0 comments Download
M cc/test/animation_test_common.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/animation_test_common.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M cc/thread_proxy.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/thread_proxy.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M webkit/compositor_bindings/web_layer_tree_view_impl.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M webkit/compositor_bindings/web_layer_tree_view_impl.cc View 1 2 3 chunks +15 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
ajuma
7 years, 11 months ago (2013-01-08 20:53:11 UTC) #1
jamesr
Why do we need a new AnimationRegistrar type? What about adding API to an existing ...
7 years, 11 months ago (2013-01-08 22:13:36 UTC) #2
ajuma
On 2013/01/08 22:13:36, jamesr wrote: > Why do we need a new AnimationRegistrar type? What ...
7 years, 11 months ago (2013-01-08 22:30:19 UTC) #3
jamesr
On 2013/01/08 22:30:19, ajuma wrote: > On 2013/01/08 22:13:36, jamesr wrote: > > Why do ...
7 years, 11 months ago (2013-01-08 22:31:15 UTC) #4
ajuma
On 2013/01/08 22:31:15, jamesr wrote: > On 2013/01/08 22:30:19, ajuma wrote: > > On 2013/01/08 ...
7 years, 11 months ago (2013-01-08 22:45:42 UTC) #5
jamesr
On 2013/01/08 22:45:42, ajuma wrote: > On 2013/01/08 22:31:15, jamesr wrote: > > On 2013/01/08 ...
7 years, 11 months ago (2013-01-08 22:54:56 UTC) #6
ajuma
On 2013/01/08 22:54:56, jamesr wrote: > On 2013/01/08 22:45:42, ajuma wrote: > > On 2013/01/08 ...
7 years, 11 months ago (2013-01-09 22:09:31 UTC) #7
jamesr
On 2013/01/09 22:09:31, ajuma wrote: > > There are two cases we have to deal ...
7 years, 11 months ago (2013-01-09 22:16:54 UTC) #8
ajuma
On 2013/01/09 22:16:54, jamesr wrote: > ? Could we make the transferAnimationsTo() call update the ...
7 years, 11 months ago (2013-01-09 22:24:39 UTC) #9
ajuma
Updated patch and description to follow the approach discussed above.
7 years, 11 months ago (2013-01-10 19:08:55 UTC) #10
jamesr
I'm just seeing "Error: old chunk mismatch" on all the side-by-side diffs - could you ...
7 years, 11 months ago (2013-01-10 19:25:58 UTC) #11
jamesr
Also, do you want a review now? The patch title and description both say "Not ...
7 years, 11 months ago (2013-01-10 19:26:17 UTC) #12
ajuma
On 2013/01/10 19:25:58, jamesr wrote: > I'm just seeing "Error: old chunk mismatch" on all ...
7 years, 11 months ago (2013-01-10 20:41:56 UTC) #13
ajuma
On 2013/01/10 19:26:17, jamesr wrote: > Also, do you want a review now? The patch ...
7 years, 11 months ago (2013-01-10 20:44:04 UTC) #14
ajuma
7 years, 10 months ago (2013-01-30 21:48:40 UTC) #15
Based on discussion in https://chromiumcodereview.appspot.com/11783101 (the
first part of this combined patch) and offline, I've updated the combined patch
so that, rather than starting animations on orphaned layers at the first
available opportunity, we instead wait until layout completes. This should
reduce the number of instances in which we have to start animations on orphaned
layers (since we're allowing more time for the orphaned layer to get added to
the tree and get started in the usual way).

Powered by Google App Engine
This is Rietveld 408576698