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

Issue 2708493002: Refactor scroll chaining to use ScrollNodes without going through LayerImpl (Closed)

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

Description

Refactor scroll chaining to use ScrollNodes without going through LayerImpl Before this patch, ScrollState::DistributeToScrollChainDescendant kept a list of const ScrollNode pointers and used the node's owning_layer_id to lookup a non-const version of the ScrollNode through LayerImpl's DistributeScroll. This indirection is not needed and we can simply use a non-const ScrollNode list, bypassing LayerImpl::DistributeScroll. It can be verified that this is equivalent by adding the following DHCECK to ScrollState::DistributeToScrollChainDescendant: DCHECK_EQ(scroll_tree.Node(layer_tree_impl_->LayerById(next->owning_layer_id)->scroll_tree_index()), next); This patch lets us remove one use of ScrollNode's owning_layer_id. BUG=693740 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2708493002 Cr-Commit-Position: refs/heads/master@{#452143} Committed: https://chromium.googlesource.com/chromium/src/+/014861b417eb3532456a982f1d81a384358fc859

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -19 lines) Patch
M cc/input/scroll_state.h View 2 chunks +4 lines, -5 lines 2 comments Download
M cc/input/scroll_state.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M cc/layers/layer_impl.h View 2 chunks +0 lines, -3 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
pdr.
3 years, 10 months ago (2017-02-20 00:34:28 UTC) #7
ajuma
lgtm
3 years, 10 months ago (2017-02-21 14:36:11 UTC) #8
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/2708493002/1
3 years, 10 months ago (2017-02-21 19:22:24 UTC) #10
bokan
lgtm https://codereview.chromium.org/2708493002/diff/1/cc/input/scroll_state.h File cc/input/scroll_state.h (right): https://codereview.chromium.org/2708493002/diff/1/cc/input/scroll_state.h#newcode64 cc/input/scroll_state.h:64: void set_scroll_chain_and_layer_tree(std::list<ScrollNode*>* scroll_chain, Nit, why pass by pointer ...
3 years, 10 months ago (2017-02-21 19:33:39 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_chromeos_ozone_rel_ng on ...
3 years, 10 months ago (2017-02-21 21:24:43 UTC) #13
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/2708493002/1
3 years, 10 months ago (2017-02-22 18:13:39 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/014861b417eb3532456a982f1d81a384358fc859
3 years, 10 months ago (2017-02-22 18:45:15 UTC) #18
pdr.
3 years, 10 months ago (2017-02-22 21:35:59 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/2708493002/diff/1/cc/input/scroll_state.h
File cc/input/scroll_state.h (right):

https://codereview.chromium.org/2708493002/diff/1/cc/input/scroll_state.h#new...
cc/input/scroll_state.h:64: void
set_scroll_chain_and_layer_tree(std::list<ScrollNode*>* scroll_chain,
On 2017/02/21 at 19:33:39, bokan wrote:
> Nit, why pass by pointer rather than const-ref?

Good catch, this was just a mistake. I started removing consts and got carried
away. Fix up: https://codereview.chromium.org/2713713002

Powered by Google App Engine
This is Rietveld 408576698