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

Issue 2824693002: Refactor LayerTreeImpl's scrollbar map to be keyed on element ids (Closed)

Created:
3 years, 8 months ago by pdr.
Modified:
3 years, 8 months ago
Reviewers:
weiliangc, wkorman
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor LayerTreeImpl's scrollbar map to be keyed on element ids An element can have up to two scrollbars and we can switch LayerTreeImpl's scrollbar tracking map from layer_id->scrollbar_layer_id to element_id->scrollbar_layer_id. This patch gets us a little closer to making the cc scrollbar code just depend on element ids instead of layer ids. With this patch we can remove the layer_id param from LayerTreeHostImpl::RegisterScrollbarAnimationController which will make it easy to remove layer ids from the scrollbar layers in a followup (i.e., track just scroll_element_id instead of scroll_layer_id and scroll_element_id). This patch is primarily a switch from layer_id to element_id. Some tests needed updates to ensure the scrolling layer's element id is set. BUG=693740 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2824693002 Cr-Commit-Position: refs/heads/master@{#465754} Committed: https://chromium.googlesource.com/chromium/src/+/7b8ed8a28833335aebe45f6e2c4193c7ee058515

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address reviewer comments #

Total comments: 2

Patch Set 3 : wrong:right :: key:value #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -82 lines) Patch
M cc/input/scrollbar_animation_controller.h View 5 chunks +6 lines, -6 lines 0 comments Download
M cc/input/scrollbar_animation_controller.cc View 7 chunks +11 lines, -11 lines 0 comments Download
M cc/input/scrollbar_animation_controller_unittest.cc View 6 chunks +12 lines, -7 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning.h View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M cc/input/single_scrollbar_animation_controller_thinning_unittest.cc View 3 chunks +6 lines, -3 lines 0 comments Download
M cc/layers/scrollbar_layer_unittest.cc View 5 chunks +4 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 3 chunks +4 lines, -7 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 3 chunks +11 lines, -11 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_damage.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 2 3 chunks +9 lines, -7 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 6 chunks +20 lines, -17 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
wkorman
lgtm May need to hit 'Publish' to send email to wei for this and the ...
3 years, 8 months ago (2017-04-17 17:44:35 UTC) #2
weiliangc
LGTM. Agree w/ Walter's suggestions about flatmap.
3 years, 8 months ago (2017-04-18 17:03:43 UTC) #3
pdr.
PTAL https://codereview.chromium.org/2824693002/diff/1/cc/layers/scrollbar_layer_unittest.cc File cc/layers/scrollbar_layer_unittest.cc (left): https://codereview.chromium.org/2824693002/diff/1/cc/layers/scrollbar_layer_unittest.cc#oldcode743 cc/layers/scrollbar_layer_unittest.cc:743: scroll_layer->SetScrollClipLayerId(layer_tree_root->id()); On 2017/04/17 at 17:44:35, wkorman wrote: > ...
3 years, 8 months ago (2017-04-19 18:02:18 UTC) #4
wkorman
lgtm https://codereview.chromium.org/2824693002/diff/1/cc/trees/layer_tree_impl.h File cc/trees/layer_tree_impl.h (right): https://codereview.chromium.org/2824693002/diff/1/cc/trees/layer_tree_impl.h#newcode539 cc/trees/layer_tree_impl.h:539: std::multimap<ElementId, int> scrollbar_map_; On 2017/04/19 18:02:18, pdr. wrote: ...
3 years, 8 months ago (2017-04-19 18:07:09 UTC) #5
pdr.
On 2017/04/19 at 18:07:09, wkorman wrote: > lgtm > > https://codereview.chromium.org/2824693002/diff/1/cc/trees/layer_tree_impl.h > File cc/trees/layer_tree_impl.h (right): ...
3 years, 8 months ago (2017-04-19 18:12:31 UTC) #6
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/2824693002/40001
3 years, 8 months ago (2017-04-19 18:13:24 UTC) #9
commit-bot: I haz the power
Failed to apply patch for cc/trees/layer_tree_host_impl.cc: While running git apply --index -3 -p1; error: patch ...
3 years, 8 months ago (2017-04-19 19:16:01 UTC) #11
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/2824693002/60001
3 years, 8 months ago (2017-04-19 20:10:24 UTC) #14
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 21:24:42 UTC) #17
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/7b8ed8a28833335aebe45f6e2c41...

Powered by Google App Engine
This is Rietveld 408576698