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

Issue 2144303002: Made layout viewport scroll updates from compositor work like ordinary layers. (Closed)

Created:
4 years, 5 months ago by bokan
Modified:
4 years, 5 months ago
Reviewers:
jbroman, enne (OOO)
CC:
jbroman, aelias_OOO_until_Jul13, ajuma+watch_chromium.org, blink-layers+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), Justin Novosad, kenneth.christiansen, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@rootScrollerOnCompositor
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Made layout viewport scroll updates from compositor work like ordinary layers. Most scroll layers in CC update the main thread with changed scroll offsets by using the did_scroll_callback, which calls into GraphicsLayer to update its copy of the scroll offset. The exception to this has been viewport layers, which don't set a did_scroll_callback. Instead, the viewport gets its values applied in WebViewImpl::applyViewportDeltas. This was done since viewport scroll bounds were dependent on page scale and top controls offset so these values had to be committed atomically. It turns out, only the inner (visual) viewport's scroll bounds depend on the page scale. While the outer (layout) viewport's scroll bounds do depend on top controls, the compositor already clamps the scroll offset to the acceptable bounds so as long as we apply the top controls delta after the scroll offset (to prevent the main thread from clamping it again) the outer viewport doesn't need to be in applyViewportDeltas. This CL removes the layout viewport as part of applyViewportDeltas and makes it use the regular did_scroll_callback mechanism. This simplifies the root scroller implementation which can change which layer is the outer viewport. Having the outer viewport use the callback avoids some race conditions as to which layer scroll gets applied to during a change of outer viewport. I've left the parameter in applyViewportDeltas' signature since that's a large mechanical change that'll touch many files. This Cl just passes 0 for the layout viewport scroll delta and a future CL will remove the parameter itself. BUG=505516 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/4222c27d55d1de9a3d8a13070266e2c8517aead5 Cr-Commit-Position: refs/heads/master@{#406022}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Initialize ScrollUpdateInfo's layer id in constructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -174 lines) Patch
M cc/trees/layer_tree_host.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 chunks +36 lines, -42 lines 0 comments Download
M cc/trees/layer_tree_host_common.h View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 1 chunk +6 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 14 chunks +32 lines, -49 lines 0 comments Download
M cc/trees/property_tree.h View 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/property_tree.cc View 1 chunk +15 lines, -5 lines 0 comments Download
M cc/trees/tree_synchronizer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp View 1 2 chunks +5 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp View 1 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 3 chunks +14 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 2 chunks +2 lines, -32 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
bokan
Since aelias@ is out, enne@, are you a good reviewer for this?
4 years, 5 months ago (2016-07-14 15:00:58 UTC) #4
bokan
https://codereview.chromium.org/2144303002/diff/1/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp File third_party/WebKit/Source/web/tests/VisualViewportTest.cpp (left): https://codereview.chromium.org/2144303002/diff/1/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp#oldcode1181 third_party/WebKit/Source/web/tests/VisualViewportTest.cpp:1181: // crbug.com/437620 This test was testing a main-thread mitigation ...
4 years, 5 months ago (2016-07-14 15:51:53 UTC) #5
enne (OOO)
lgtm in general This all seems pretty straightforward. https://codereview.chromium.org/2144303002/diff/20001/cc/trees/layer_tree_host_common.cc File cc/trees/layer_tree_host_common.cc (right): https://codereview.chromium.org/2144303002/diff/20001/cc/trees/layer_tree_host_common.cc#newcode162 cc/trees/layer_tree_host_common.cc:162: inner_viewport_scroll.layer_id ...
4 years, 5 months ago (2016-07-14 18:56:04 UTC) #6
bokan
+jbroman@ for platform/graphics https://codereview.chromium.org/2144303002/diff/20001/cc/trees/layer_tree_host_common.cc File cc/trees/layer_tree_host_common.cc (right): https://codereview.chromium.org/2144303002/diff/20001/cc/trees/layer_tree_host_common.cc#newcode162 cc/trees/layer_tree_host_common.cc:162: inner_viewport_scroll.layer_id = Layer::INVALID_ID; On 2016/07/14 18:56:04, ...
4 years, 5 months ago (2016-07-14 21:41:24 UTC) #8
bokan
jbroman@: ping
4 years, 5 months ago (2016-07-18 14:45:25 UTC) #9
jbroman
platform lgtm (thanks for the ping; sorry for not noticing this CL earlier)
4 years, 5 months ago (2016-07-18 14:48:14 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2144303002/60001
4 years, 5 months ago (2016-07-18 14:52:44 UTC) #13
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-18 14:52:46 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-18 17:25:11 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-18 17:26:26 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4222c27d55d1de9a3d8a13070266e2c8517aead5
Cr-Commit-Position: refs/heads/master@{#406022}

Powered by Google App Engine
This is Rietveld 408576698