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

Issue 2867793002: Add a cache of LayerImpl's viewport layer type (Closed)

Created:
3 years, 7 months ago by pdr.
Modified:
3 years, 7 months ago
Reviewers:
jaydasika, enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a cache of LayerImpl's viewport layer type This patch caches the viewport layer type of LayerImpl to fix a performance regression in LayerImpl::ViewportBoundsDelta due to layer lookups. Big changes in this patch: * A viewport_layer_type_ member has been added to LayerImpl along with getters and setters. * The viewport layer type is updated when LayerTreeImpl's viewport layer id changes, or when LayerImpl's scroll_clip_layer_id changes. Both of these values affect the viewport layer type. * DCHECKs have been added that the viewport layer type does not change. Making this a constructor parameter to LayerImpl would be ideal but is very difficult. * DCHECKs have been added in LTI::IsViewportLayerId that verify LayerTreeImpl's viewport layer ids are always in sync with LayerImpl's viewport layer types. BUG=715956 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2867793002 Cr-Commit-Position: refs/heads/master@{#470743} Committed: https://chromium.googlesource.com/chromium/src/+/6280cc1d5a1dccfbe23ca438eed862e245f18614

Patch Set 1 #

Patch Set 2 : Use typed enum because by default VC uses signed enums #

Patch Set 3 : sacrificial offering to appease the compiler gods #

Patch Set 4 : Back to static cats and unsigned enums #

Patch Set 5 : Fix compile on windows again #

Total comments: 12

Patch Set 6 : Address reviewer comments #

Total comments: 2

Patch Set 7 : ADD_A_LAST_ENUM #

Patch Set 8 : Rebase from space #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -34 lines) Patch
M cc/layers/layer_impl.h View 1 2 3 4 5 6 3 chunks +26 lines, -3 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 3 4 5 6 7 4 chunks +28 lines, -15 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 4 chunks +37 lines, -14 lines 0 comments Download
M cc/trees/layer_tree_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 41 (27 generated)
pdr.
3 years, 7 months ago (2017-05-08 16:46:17 UTC) #4
jaydasika
Have you measured if the cc_perftest, CalcDrawPropsTest, shows an improvement with this patch ? https://codereview.chromium.org/2867793002/diff/80001/cc/trees/layer_tree_impl.cc ...
3 years, 7 months ago (2017-05-09 05:54:22 UTC) #21
enne (OOO)
https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.cc#newcode543 cc/layers/layer_impl.cc:543: default: style nit: can you not use default/NOTREACHED in ...
3 years, 7 months ago (2017-05-09 17:08:30 UTC) #22
pdr.
On 2017/05/09 at 05:54:22, jaydasika wrote: > Have you measured if the cc_perftest, CalcDrawPropsTest, shows ...
3 years, 7 months ago (2017-05-09 22:19:07 UTC) #23
pdr.
PTAL, also a question for Enne on Line 284. https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.cc#newcode543 cc/layers/layer_impl.cc:543: ...
3 years, 7 months ago (2017-05-09 22:20:07 UTC) #24
enne (OOO)
https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/2867793002/diff/80001/cc/layers/layer_impl.h#newcode284 cc/layers/layer_impl.h:284: // Once set as a viewport layer type, the ...
3 years, 7 months ago (2017-05-09 22:31:52 UTC) #27
pdr.
https://codereview.chromium.org/2867793002/diff/100001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/2867793002/diff/100001/cc/layers/layer_impl.h#newcode524 cc/layers/layer_impl.h:524: static_assert(OUTER_VIEWPORT_SCROLL < (1u << 3), On 2017/05/09 at 22:31:52, ...
3 years, 7 months ago (2017-05-09 22:42:29 UTC) #28
enne (OOO)
Thanks! lgtm
3 years, 7 months ago (2017-05-09 22:52:26 UTC) #29
pdr.
Jaydasika, could you PTAL as well? Lets commit if you are happy.
3 years, 7 months ago (2017-05-09 22:53:18 UTC) #30
jaydasika
lgtm https://codereview.chromium.org/2867793002/diff/80001/cc/trees/layer_tree_impl.cc File cc/trees/layer_tree_impl.cc (left): https://codereview.chromium.org/2867793002/diff/80001/cc/trees/layer_tree_impl.cc#oldcode144 cc/trees/layer_tree_impl.cc:144: return true; On 2017/05/09 22:20:07, pdr. wrote: > ...
3 years, 7 months ago (2017-05-09 22:55:12 UTC) #31
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/2867793002/120001
3 years, 7 months ago (2017-05-09 23:00:46 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-10 01:06:49 UTC) #35
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/2867793002/140001
3 years, 7 months ago (2017-05-10 19:46:01 UTC) #38
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 23:23:09 UTC) #41
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/6280cc1d5a1dccfbe23ca438eed8...

Powered by Google App Engine
This is Rietveld 408576698