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

Issue 2498823002: Paint invalidation of local attachment backgrounds (Closed)

Created:
4 years, 1 month ago by Xianzhu
Modified:
4 years, 1 month ago
Reviewers:
chrishtr
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), jbroman, jchaffraix+rendering, Justin Novosad, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Paint invalidation of local attachment backgrounds Previously if a local attachment background was painted on the scrolling contents layer, we called invalidatePaintUsingContainer() with the visual rect of the object, and in setBackingNeedsPaintInvalidationInRect() we invalidated the rect on the main layer, and invalidated the whole scrolling contents layer. This CL specially handles background invalidation on scrolling contents layer with LayoutObject::backgroundChangedSinceLastPaintInvalidation() and a new paint invalidation reason PaintInvalidationBackgroundOnScrollingContentsLayer. Also supports incremental invalidation of backgrounds on scrolling contents layer caused by layout overflow change, if possible. We need this change because now more backgrounds are/will be treated as local attachment [equivalent] and previous handling of paint invalidation of them caused too many unnecessary full invalidation on both the container layer and the scrolling contents layer. We (will) have more background treated as local attachment because of the following reasons: - With rootLayerScrolling, most LayoutViews (except those with fixed background) are treated as normal scrolling object with local attachment background. Always full invalidation of either container or contents layer is not acceptable at least on Android on which hiding/showing the top control (which causes resize of the LayoutView) is a key scenario of performance and power consumption; - With composited scrolling with opaque background regardless of LCD text, we treat normal solid color backgrounds as local attachment backgrounds. Full paint invalidation of scrolling contents layer of them is a big regression. BUG=660156, 568847 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/a2907993ffbc7f8e21b2dce12c2ff5d541afca7e Cr-Commit-Position: refs/heads/master@{#433093}

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : . #

Patch Set 4 : - #

Patch Set 5 : Rebase #

Patch Set 6 : Update test expectations #

Total comments: 4

Patch Set 7 : - #

Total comments: 10

Patch Set 8 : - #

Unified diffs Side-by-side diffs Delta from patch set Stats (+806 lines, -125 lines) Patch
M third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.txt View 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-composited.html View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-composited-expected.html View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-composited-expected.txt View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-equivalent.html View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-equivalent-expected.html View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/background-attachment-local-equivalent-expected.txt View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-scrolling-contents-outline-change.html View 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-scrolling-contents-outline-change-expected.html View 1 chunk +5 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-scrolling-contents-outline-change-expected.txt View 2 chunks +11 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/overflow-scroll-local-background-text-color-change-expected.txt View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/repaint-composited-child-in-scrolled-container.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow-scroll-local-background-text-color-change-expected.txt View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BoxPaintInvalidator.h View 1 2 3 4 5 6 7 1 chunk +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp View 1 2 3 4 5 6 7 7 chunks +132 lines, -44 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp View 1 2 3 4 5 6 7 12 chunks +395 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.h View 2 chunks +3 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp View 1 3 chunks +13 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PaintInvalidationReason.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PaintInvalidationReason.cpp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (32 generated)
Xianzhu
4 years, 1 month ago (2016-11-16 22:20:15 UTC) #24
chrishtr
Is the main purpose of this CL avoiding special-casing with RLS? Or performance? Or general ...
4 years, 1 month ago (2016-11-17 00:12:54 UTC) #25
Xianzhu
On 2016/11/17 00:12:54, chrishtr wrote: > Is the main purpose of this CL avoiding special-casing ...
4 years, 1 month ago (2016-11-17 17:04:01 UTC) #27
Xianzhu
https://codereview.chromium.org/2498823002/diff/100001/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp File third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp (right): https://codereview.chromium.org/2498823002/diff/100001/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp#newcode90 third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp:90: if (rightDelta != bottomDelta) { On 2016/11/17 00:12:54, chrishtr ...
4 years, 1 month ago (2016-11-17 17:37:53 UTC) #28
chrishtr
https://codereview.chromium.org/2498823002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (left): https://codereview.chromium.org/2498823002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#oldcode1261 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1261: if (scrollSize != m_scrollingContentsLayer->size() || Why this change? https://codereview.chromium.org/2498823002/diff/120001/third_party/WebKit/Source/core/paint/BoxPaintInvalidator.cpp ...
4 years, 1 month ago (2016-11-17 20:42:36 UTC) #29
Xianzhu
https://codereview.chromium.org/2498823002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp File third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp (left): https://codereview.chromium.org/2498823002/diff/120001/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp#oldcode1261 third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp:1261: if (scrollSize != m_scrollingContentsLayer->size() || On 2016/11/17 20:42:36, chrishtr ...
4 years, 1 month ago (2016-11-17 23:36:41 UTC) #31
chrishtr
lgtm Nice work! backgroundChangedSinceLastPaintInvalidation is not actually new in this CL, please adjust the description ...
4 years, 1 month ago (2016-11-18 00:48:40 UTC) #33
Xianzhu
On 2016/11/18 00:48:40, chrishtr wrote: > lgtm > > Nice work! > > backgroundChangedSinceLastPaintInvalidation is ...
4 years, 1 month ago (2016-11-18 00:52:39 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/2498823002/140001
4 years, 1 month ago (2016-11-18 02:27:45 UTC) #39
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-11-18 04:16:44 UTC) #41
commit-bot: I haz the power
4 years, 1 month ago (2016-11-18 04:18:33 UTC) #43
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a2907993ffbc7f8e21b2dce12c2ff5d541afca7e
Cr-Commit-Position: refs/heads/master@{#433093}

Powered by Google App Engine
This is Rietveld 408576698