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

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed)

Created:
4 years, 7 months ago by loyso (OOO)
Modified:
4 years, 7 months ago
Reviewers:
Ian Vollick, ajuma, esprehn
CC:
darktears, blink-layers+watch_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, Eric Willigers, f(malita), jbauman+watch_chromium.org, jbroman, jchaffraix+rendering, Justin Novosad, kalyank, kinuko+watch, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, piman+watch_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans, sievers+watch_chromium.org, szager+layoutwatch_chromium.org, Ian Vollick, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@erasedomids
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CC Animation: Use ElementId to attach CC animation players. THIS IS A SKETCH. PREVIEW ONLY. BUG=510960 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase. Assign new elementId in LinkHighlightImpl. #

Patch Set 3 : Port CC perftest. Fix compilation. #

Patch Set 4 : Two fixes. Rebase. #

Patch Set 5 : Assign ElementId dynamically in ElementAnimations. #

Patch Set 6 : Assign ElementId in advance if Element has a scrolling layer. #

Patch Set 7 : Let CC clients generate their own ElementIds locally. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1083 lines, -664 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M cc/animation/animation_host_perftest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M cc/animation/animation_player_unittest.cc View 4 chunks +16 lines, -16 lines 0 comments Download
M cc/animation/element_animations.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M cc/animation/element_animations_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/layer.cc View 1 2 3 3 chunks +19 lines, -0 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 3 4 chunks +23 lines, -2 lines 0 comments Download
M cc/layers/layer_utils_unittest.cc View 1 2 3 4 5 6 14 chunks +47 lines, -36 lines 0 comments Download
M cc/test/animation_test_common.h View 1 2 3 4 5 6 2 chunks +21 lines, -19 lines 0 comments Download
M cc/test/animation_test_common.cc View 1 chunk +39 lines, -29 lines 0 comments Download
M cc/test/animation_timelines_test_common.h View 2 chunks +4 lines, -4 lines 0 comments Download
M cc/test/animation_timelines_test_common.cc View 4 chunks +7 lines, -7 lines 0 comments Download
M cc/test/fake_picture_layer.h View 1 2 3 4 5 6 1 chunk +8 lines, -2 lines 0 comments Download
M cc/test/fake_picture_layer_impl.cc View 1 2 3 4 5 6 4 chunks +6 lines, -1 line 0 comments Download
M cc/test/layer_test_common.h View 1 2 3 4 5 6 8 chunks +8 lines, -0 lines 0 comments Download
M cc/test/layer_test_common.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/layer_tree_host_common_test.h View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/layer_tree_host_common_test.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M cc/test/layer_tree_test.h View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
A cc/test/test_element_id.h View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
A cc/test/test_element_id.cc View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 3 chunks +15 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 chunks +114 lines, -25 lines 2 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 90 chunks +207 lines, -191 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 chunk +5 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 5 chunks +23 lines, -18 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 76 chunks +137 lines, -109 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 23 chunks +32 lines, -32 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 3 chunks +12 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 5 chunks +135 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/animation/Animation.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/Animation.cpp View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CompositorAnimations.h View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CompositorAnimations.cpp View 1 chunk +0 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/animation/ElementAnimations.cpp View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/animation/KeyframeEffect.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/animation/KeyframeEffect.cpp View 1 2 3 2 chunks +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 4 chunks +32 lines, -11 lines 2 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h View 2 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositorElementId.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/platform/graphics/CompositorElementId.cpp View 1 2 3 4 5 6 1 chunk +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp View 3 chunks +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp View 1 4 chunks +19 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/web/LinkHighlightImpl.cpp View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp View 2 chunks +0 lines, -4 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 3 chunks +7 lines, -0 lines 0 comments Download
M ui/compositor/layer_animator.h View 2 chunks +3 lines, -2 lines 0 comments Download
M ui/compositor/layer_animator.cc View 1 2 3 4 5 6 3 chunks +19 lines, -13 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 9 (4 generated)
loyso (OOO)
4 years, 7 months ago (2016-05-03 07:23:16 UTC) #4
loyso (OOO)
https://codereview.chromium.org/1944623002/diff/1/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp File third_party/WebKit/Source/core/animation/CompositorAnimations.cpp (left): https://codereview.chromium.org/1944623002/diff/1/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp#oldcode428 third_party/WebKit/Source/core/animation/CompositorAnimations.cpp:428: This is the cool deletion. We will bypass all ...
4 years, 7 months ago (2016-05-03 07:26:40 UTC) #5
esprehn
I think there's some confusion here, there can't be any composited animations until the compositor ...
4 years, 7 months ago (2016-05-10 22:49:30 UTC) #7
esprehn
https://codereview.chromium.org/1944623002/diff/120001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/1944623002/diff/120001/cc/trees/layer_tree_host.cc#newcode1278 cc/trees/layer_tree_host.cc:1278: return iter != element_id_to_layer_map_.end() ? iter->second.scroll : nullptr; this ...
4 years, 7 months ago (2016-05-10 22:55:13 UTC) #8
loyso (OOO)
4 years, 7 months ago (2016-05-12 06:02:15 UTC) #9
https://codereview.chromium.org/1944623002/diff/120001/cc/trees/layer_tree_ho...
File cc/trees/layer_tree_host.cc (right):

https://codereview.chromium.org/1944623002/diff/120001/cc/trees/layer_tree_ho...
cc/trees/layer_tree_host.cc:1278: return iter != element_id_to_layer_map_.end()
? iter->second.scroll : nullptr;
On 2016/05/10 22:55:13, esprehn wrote:
> this could just be tracked inside blink and accessed through a delegate or
> something?
> 
> client_->FindLayerById(element_id)
> 
> and blink can do
> DOMNodeIds::get(element_id)->layoutObject()->compositedLayerMapping()->layer()
> or whatever.
We definitely can't do this:
1) In impl compositor thread;
2) In Aura compositor (that's another client of CC)

https://codereview.chromium.org/1944623002/diff/120001/third_party/WebKit/Sou...
File
third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
(right):

https://codereview.chromium.org/1944623002/diff/120001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1495:
if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) {
On 2016/05/10 22:55:13, esprehn wrote:
> we can just keep a data member on CompositedLayerMapping for this, CLM must
> exist if anything in cc exists, and if CLM is destroyed anything in cc must be
> destroyed too.
> 
> If the question is about CompositorWorker then we should use DOMNodeIds.

Do you mean
Node* CompositedLayerMapping::m_owningNode 
or
CompositorElementId CompositedLayerMapping::m_compositorElementId (a unique for
CompositedLayerMapping, 1 per CLM)
?

Powered by Google App Engine
This is Rietveld 408576698