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

Issue 2539693002: Early-out from the prepaint tree walk (Closed)

Created:
4 years ago by pdr.
Modified:
4 years ago
Reviewers:
chrishtr, Xianzhu, trchen
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Early-out from the prepaint tree walk This patch stops the prepaint tree walk when no paint invalidation or paint property updates are needed. The three major changes are: 1) PaintPropertyTreeBuilder now detects when properties are added or removed and forces a paint property update for all descendants. This is needed because tree structure changes can cause descendant objects to reference new/different ancestors. 2) When stopping the prepaint tree walk due to throttled frames, paint invalidation and property update flags are no longer cleared. This allows subsequent prepaint tree walks to correctly invalidate subframes when they unthrottle. 3) PrePaintTreeWalk::walk(LayoutObject&...) exits early when possible. Design doc: https://docs.google.com/document/d/1_GkBfvameyhnLV7ODIRsOoTedQEG5liAcHwAxmwS-Vk/view Performance results on blink_perf.Paint[1]: color-changes.html: -3.4% large-table-background-change-with-invisible-collapsed-borders.html: -19.2% large-table-background-change-with-visible-collapsed-borders.html: -3.0% large-table-collapsed-border-change.html: -0.4% large-table-collapsed-border-change-with-backgrounds.html: -6.8% large-table-collapsed-border-change-with-text.html: -17.2% large-table-repaint.html: -6.0% paint-offset-changes.html: -4.7% transform-changes.html: -2.7% [1] tools/perf/run_benchmark blink_perf.paint --browser=content-shell-release --pageset-repeat=5 --extra-browser-args=--enable-slimming-paint-v2 BUG=645667 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/6afc534ee0a973a25230fc5f6998ecfdbce781ee Cr-Commit-Position: refs/heads/master@{#435681}

Patch Set 1 #

Patch Set 2 : Fix mistake in not noticing property changes when clearing properties #

Patch Set 3 : Faster setNeedsPaintPropertyUpdate when subtree updates are forced #

Patch Set 4 : Fix a bug in not propagating frameview needsUpdate, and a bug due to throttled rendering #

Patch Set 5 : Do not force subtree updates for all paint invalidation reasons, add todo to track paint offset cha… #

Total comments: 3

Patch Set 6 : Use typed enums to workaround win-specific clang warning C4805 about type conversions #

Patch Set 7 : Switch away from typed enums which Windows clang does not like #

Total comments: 6

Patch Set 8 : Address chrishtrs comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -260 lines) Patch
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 4 5 6 7 1 chunk +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h View 1 2 3 4 5 6 7 6 chunks +26 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPaintProperties.h View 1 2 3 4 5 6 7 3 chunks +79 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h View 1 2 3 2 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 1 2 3 4 5 6 7 30 chunks +137 lines, -122 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 2 3 4 5 6 7 3 chunks +84 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp View 1 2 3 4 5 6 5 chunks +70 lines, -66 lines 0 comments Download

Messages

Total messages: 38 (27 generated)
pdr.
4 years ago (2016-11-30 07:42:23 UTC) #8
Xianzhu
lgtm
4 years ago (2016-11-30 23:59:19 UTC) #19
chrishtr
https://codereview.chromium.org/2539693002/diff/80001/third_party/WebKit/Source/core/layout/LayoutObject.cpp File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2539693002/diff/80001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#newcode2737 third_party/WebKit/Source/core/layout/LayoutObject.cpp:2737: // |paintInvalidationParent()| is used to ensure we continue marking ...
4 years ago (2016-12-01 02:36:35 UTC) #22
pdr.
https://codereview.chromium.org/2539693002/diff/120001/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h File third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h (right): https://codereview.chromium.org/2539693002/diff/120001/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h#newcode31 third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h:31: m_hadForceSubtreeUpdate(context.forceSubtreeUpdate) { On 2016/12/01 at 02:36:35, chrishtr wrote: > ...
4 years ago (2016-12-01 09:35:35 UTC) #23
pdr.
On 2016/12/01 at 02:36:35, chrishtr wrote: > https://codereview.chromium.org/2539693002/diff/80001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#newcode2743 > third_party/WebKit/Source/core/layout/LayoutObject.cpp:2743: void LayoutObject::setDescendantNeedsPaintPropertyUpdate() { > *markAncestorChain* ...
4 years ago (2016-12-01 09:46:53 UTC) #24
chrishtr
On 2016/12/01 at 09:46:53, pdr wrote: > On 2016/12/01 at 02:36:35, chrishtr wrote: > > ...
4 years ago (2016-12-01 15:16:33 UTC) #29
chrishtr
lgtm
4 years ago (2016-12-01 15:16:51 UTC) #30
pdr.
On 2016/12/01 at 15:16:51, chrishtr wrote: > lgtm Thanks! In we go
4 years ago (2016-12-01 19:52:11 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/2539693002/140001
4 years ago (2016-12-01 19:52:44 UTC) #34
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years ago (2016-12-01 19:59:30 UTC) #36
commit-bot: I haz the power
4 years ago (2016-12-01 20:02:33 UTC) #38
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6afc534ee0a973a25230fc5f6998ecfdbce781ee
Cr-Commit-Position: refs/heads/master@{#435681}

Powered by Google App Engine
This is Rietveld 408576698