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

Issue 2259493004: Fix Compositing of Opaque Scrolling Layers and Add Tests (Closed)

Created:
4 years, 4 months ago by Stephen Chennney
Modified:
4 years, 3 months ago
Reviewers:
flackr, chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix Compositing of Opaque Scrolling Layers and Add Tests Move the CompositedLayerMapping::shouldPaintBackgroundOntoScrollingContentsLayer method to PaintLayer to use it for detecting composited scrolling. The method only uses data from PaintLayer, so there's no reason to have it elsewhere. Switch the check in PaintLayerScrollableArea for compositing scrollers on low-dpi devices to use the method. Fix the check in CompositingReasonsFinder to detect opaque background scrollers as a reason Remove the unnecessary check for self painting layer in PaintLayer::backgroundIsKnownToBeOpaqueInRect. The code is always called from a self painting layer's GraphicsLayer, or it's called by the recursive call checking childrens' opaqueness. The former case means the layer is always self painting, while the latter seems incorrect - one should not exclude, not include, child self painting layers. Add tests for promotion and demotion of scrolling layers as they switch between opaque and transparent backgrounds. R=flackr@chromium.org, chrishtr@chromium.org BUG=381840 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/87b0099aa31169f8c7a40b4f93b4a1e86ddf53a1 Cr-Commit-Position: refs/heads/master@{#417743}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add opacity check #

Total comments: 1

Patch Set 3 : Fix bugs and update tests #

Patch Set 4 : Added test for style chnage #

Patch Set 5 : Revert unnecessary change. #

Total comments: 11

Patch Set 6 : New tests. #

Total comments: 2

Patch Set 7 : Fix the tests. #

Total comments: 17

Patch Set 8 : Address review comments #

Total comments: 17

Patch Set 9 : Review comments addressed and test baselines. #

Total comments: 13

Patch Set 10 : More review updates #

Patch Set 11 : Rebase and stop adding CompositingReasonOutOfFlowClipping #

Total comments: 2

Patch Set 12 : Fix comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -99 lines) Patch
M third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html View 1 2 3 4 5 6 7 8 1 chunk +76 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent-expected.txt View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html View 1 2 3 4 5 6 7 8 1 chunk +76 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque-expected.txt View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-opaque-background.html View 1 2 3 4 5 6 7 3 chunks +5 lines, -3 lines 0 comments Download
A + third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-opaque-background-will-change.html View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-with-opaque-background-will-change-expected.txt View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-scroll-background-opaque-to-transparent-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-scroll-background-transparent-to-opaque-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-scroll-background-opaque-to-transparent-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-scroll-background-transparent-to-opaque-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-scroll-background-opaque-to-transparent-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-scroll-background-transparent-to-opaque-expected.png View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp View 1 2 3 4 5 6 7 2 chunks +0 lines, -47 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +114 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 90 (48 generated)
Stephen Chennney
I've had to juggle stuff around to use the correct check for compositing opaque scrollers. ...
4 years, 4 months ago (2016-08-18 20:59:50 UTC) #2
flackr
I originally had shouldPaintBackgroundOntoScrollingContentsLayer in PaintLayer but with it only being used in CompositedLayerMapping chris ...
4 years, 4 months ago (2016-08-19 03:19:30 UTC) #7
Stephen Chennney
Gmail still does not composit due to the lack of either background-attachment: local (which is ...
4 years, 4 months ago (2016-08-19 17:30:41 UTC) #10
flackr
I have a patch already written to handle all of the cases which are equivalent ...
4 years, 4 months ago (2016-08-19 17:36:53 UTC) #11
Stephen Chennney
On 2016/08/19 17:36:53, flackr wrote: > I have a patch already written to handle all ...
4 years, 4 months ago (2016-08-19 17:41:49 UTC) #12
flackr
On 2016/08/19 at 17:36:53, flackr wrote: > I have a patch already written to handle ...
4 years, 4 months ago (2016-08-19 17:42:04 UTC) #13
Stephen Chennney
> On 2016/08/19 17:36:53, flackr wrote: > > Can you add some tests which verify ...
4 years, 4 months ago (2016-08-19 20:04:51 UTC) #16
Stephen Chennney
> On 2016/08/19 17:36:53, flackr wrote: > > Can you add some tests which verify ...
4 years, 4 months ago (2016-08-19 20:04:52 UTC) #17
flackr
On 2016/08/19 at 20:04:52, schenney wrote: > > On 2016/08/19 17:36:53, flackr wrote: > > ...
4 years, 4 months ago (2016-08-19 20:07:36 UTC) #18
Stephen Chennney
On 2016/08/19 20:07:36, flackr wrote: > On 2016/08/19 at 20:04:52, schenney wrote: > > > ...
4 years, 4 months ago (2016-08-19 20:43:58 UTC) #19
flackr
On 2016/08/19 at 20:43:58, schenney wrote: > On 2016/08/19 20:07:36, flackr wrote: > > On ...
4 years, 4 months ago (2016-08-22 15:34:03 UTC) #20
Stephen Chennney
On 2016/08/22 15:34:03, flackr wrote: > On 2016/08/19 at 20:43:58, schenney wrote: > > On ...
4 years, 3 months ago (2016-08-25 20:52:12 UTC) #23
Stephen Chennney
Ready for review, but I think it will have to wait until flackr's other patch ...
4 years, 3 months ago (2016-08-26 18:01:41 UTC) #30
Stephen Chennney
On 2016/08/26 18:01:41, Stephen Chennney wrote: > Ready for review, but I think it will ...
4 years, 3 months ago (2016-08-26 18:05:52 UTC) #31
flackr
https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp (right): https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp#newcode145 third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp:145: if (hasOverflowScrollTrigger() || RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled()) { I don't understand why ...
4 years, 3 months ago (2016-08-26 18:24:24 UTC) #32
Stephen Chennney
https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp (right): https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp#newcode145 third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp:145: if (hasOverflowScrollTrigger() || RuntimeEnabledFeatures::compositeOpaqueScrollersEnabled()) { On 2016/08/26 18:24:23, flackr ...
4 years, 3 months ago (2016-08-26 18:42:08 UTC) #33
Stephen Chennney
https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/2259493004/diff/80001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode1506 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:1506: && layer->backgroundIsKnownToBeOpaqueInRect(toLayoutBox(layer->layoutObject())->paddingBoxRect()); We have a chicken and egg problem. ...
4 years, 3 months ago (2016-08-26 20:46:01 UTC) #36
Stephen Chennney
I think this is basically ready to go. I need baselines for the new tests ...
4 years, 3 months ago (2016-08-29 20:49:52 UTC) #38
Stephen Chennney
I'm going to break out the change to PaintLayer::backgroundIsKnownToBeOpaqueInRect to correct the selfPaintingLayer thing. Otherwise ...
4 years, 3 months ago (2016-08-30 19:19:50 UTC) #47
chrishtr
Rob, once you're done reviewing I'll give it a once-over.
4 years, 3 months ago (2016-08-30 20:36:31 UTC) #50
flackr
https://codereview.chromium.org/2259493004/diff/120001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html (right): https://codereview.chromium.org/2259493004/diff/120001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html#newcode42 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html:42: if (!hasOpaqueCompositedScrollingContentsLayer(JSON.parse(window.internals.layerTreeAsText(document)))) The negation of hasOpaqueCompositedScrollingContentsLayer is a little ...
4 years, 3 months ago (2016-08-30 21:14:50 UTC) #51
Stephen Chennney
I'll get a patch up shortly with all these and get tests running. https://codereview.chromium.org/2259493004/diff/120001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html File ...
4 years, 3 months ago (2016-08-31 20:50:21 UTC) #52
flackr
LGTM https://codereview.chromium.org/2259493004/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp (right): https://codereview.chromium.org/2259493004/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp#newcode146 third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp:146: if (layer->clipParent()) On 2016/08/31 at 20:50:20, Stephen Chennney ...
4 years, 3 months ago (2016-09-01 21:06:46 UTC) #57
flackr
This will need to be rebased on my recently landed patch of course - but ...
4 years, 3 months ago (2016-09-01 21:11:13 UTC) #58
chrishtr
https://codereview.chromium.org/2259493004/diff/140001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html (right): https://codereview.chromium.org/2259493004/diff/140001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html#newcode51 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html:51: if (!hasCompositedScrollingContentsLayer(JSON.parse(window.internals.layerTreeAsText(document)))) Please use testharness.js + assert methods there ...
4 years, 3 months ago (2016-09-02 01:19:39 UTC) #59
Stephen Chennney
I'll get a new patch up tomorrow, but I've meanwhile addressed the review questions. https://codereview.chromium.org/2259493004/diff/140001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html ...
4 years, 3 months ago (2016-09-06 21:06:21 UTC) #60
chrishtr
https://codereview.chromium.org/2259493004/diff/140001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html File third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html (right): https://codereview.chromium.org/2259493004/diff/140001/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html#newcode51 third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html:51: if (!hasCompositedScrollingContentsLayer(JSON.parse(window.internals.layerTreeAsText(document)))) On 2016/09/06 at 21:06:20, Stephen Chennney wrote: ...
4 years, 3 months ago (2016-09-06 22:17:59 UTC) #61
Stephen Chennney
Still working on this. I need to get new baselines. I'll add some more comments ...
4 years, 3 months ago (2016-09-07 19:57:54 UTC) #62
chrishtr
https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp (left): https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp#oldcode145 third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp:145: if (hasOverflowScrollTrigger()) { Should hasOverflowScrollTrigger() now be deleted? Its ...
4 years, 3 months ago (2016-09-07 20:38:07 UTC) #63
Stephen Chennney
I missed a couple of requested changes. I'll deal with that now. flackr, could you ...
4 years, 3 months ago (2016-09-07 20:38:40 UTC) #64
Stephen Chennney
I think my previous round of comments addressed the other questions. https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp (left): ...
4 years, 3 months ago (2016-09-07 20:49:36 UTC) #67
flackr
https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp (right): https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp#newcode282 third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp:282: if (layer->clipParent()) { On 2016/09/07 at 20:38:40, Stephen Chennney ...
4 years, 3 months ago (2016-09-07 20:57:06 UTC) #68
Stephen Chennney
https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp (right): https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp#newcode282 third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp:282: if (layer->clipParent()) { On 2016/09/07 20:57:06, flackr wrote: > ...
4 years, 3 months ago (2016-09-07 21:08:20 UTC) #69
flackr
https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp (right): https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp#newcode282 third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp:282: if (layer->clipParent()) { On 2016/09/07 at 21:08:19, Stephen Chennney ...
4 years, 3 months ago (2016-09-07 22:38:41 UTC) #70
Stephen Chennney
On 2016/09/07 22:38:41, flackr wrote: > https://codereview.chromium.org/2259493004/diff/160001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp > File > third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp > (right): > > ...
4 years, 3 months ago (2016-09-08 19:26:07 UTC) #73
Stephen Chennney
It appears that never setting CompositingReasonOutOfFlowClipping makes no difference on Linux tests, but then maybe ...
4 years, 3 months ago (2016-09-09 18:33:25 UTC) #78
Stephen Chennney
On 2016/09/09 18:33:25, Stephen Chennney wrote: > It appears that never setting CompositingReasonOutOfFlowClipping makes no ...
4 years, 3 months ago (2016-09-09 19:36:20 UTC) #79
chrishtr
lgtm Looks good with small nit. https://codereview.chromium.org/2259493004/diff/200001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp (right): https://codereview.chromium.org/2259493004/diff/200001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp#newcode239 third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp:239: // Add CompositingReasonOverflowScrollingTouch ...
4 years, 3 months ago (2016-09-09 20:32:14 UTC) #82
Stephen Chennney
Thanks all for the hard review slog. https://codereview.chromium.org/2259493004/diff/200001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp File third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp (right): https://codereview.chromium.org/2259493004/diff/200001/third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp#newcode239 third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp:239: // Add ...
4 years, 3 months ago (2016-09-09 20:56:11 UTC) #85
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/2259493004/220001
4 years, 3 months ago (2016-09-09 20:56:19 UTC) #86
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 3 months ago (2016-09-09 22:47:10 UTC) #88
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 22:51:55 UTC) #90
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/87b0099aa31169f8c7a40b4f93b4a1e86ddf53a1
Cr-Commit-Position: refs/heads/master@{#417743}

Powered by Google App Engine
This is Rietveld 408576698