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

Side by Side Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp

Issue 2585603002: [SPInvaldation] Update subtree paint properties when a layout subtree is inserted (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PrePaintTreeWalk.h" 5 #include "core/paint/PrePaintTreeWalk.h"
6 6
7 #include "core/dom/DocumentLifecycle.h" 7 #include "core/dom/DocumentLifecycle.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 bool PrePaintTreeWalk::walk(FrameView& frameView, 47 bool PrePaintTreeWalk::walk(FrameView& frameView,
48 const PrePaintTreeWalkContext& context) { 48 const PrePaintTreeWalkContext& context) {
49 if (frameView.shouldThrottleRendering()) { 49 if (frameView.shouldThrottleRendering()) {
50 // The walk was interrupted by throttled rendering so this subtree was not 50 // The walk was interrupted by throttled rendering so this subtree was not
51 // fully updated. 51 // fully updated.
52 return false; 52 return false;
53 } 53 }
54 54
55 PrePaintTreeWalkContext localContext(context); 55 PrePaintTreeWalkContext localContext(context);
56
57 if (frameView.shouldInvalidateAllPaintAndPaintProperties()) {
58 localContext.treeBuilderContext.forceSubtreeUpdate = true;
59 localContext.paintInvalidatorContext.forcedSubtreeInvalidationFlags |=
60 PaintInvalidatorContext::ForcedWholeTreeFullInvalidation;
61 frameView.clearShouldInvalidateAllPaintAndPaintProperties();
62 }
63
64 m_propertyTreeBuilder.updateProperties(frameView, 56 m_propertyTreeBuilder.updateProperties(frameView,
65 localContext.treeBuilderContext); 57 localContext.treeBuilderContext);
66 m_paintInvalidator.invalidatePaintIfNeeded( 58 m_paintInvalidator.invalidatePaintIfNeeded(
67 frameView, localContext.paintInvalidatorContext); 59 frameView, localContext.paintInvalidatorContext);
68 60
69 LayoutView* view = frameView.layoutView(); 61 LayoutView* view = frameView.layoutView();
70 bool descendantsFullyUpdated = view ? walk(*view, localContext) : true; 62 bool descendantsFullyUpdated = view ? walk(*view, localContext) : true;
71 if (descendantsFullyUpdated) { 63 if (descendantsFullyUpdated) {
72 #if DCHECK_IS_ON() 64 #if DCHECK_IS_ON()
73 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags(); 65 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 188
197 if (descendantsFullyUpdated) { 189 if (descendantsFullyUpdated) {
198 // If descendants were not updated, do not clear flags. During the next 190 // If descendants were not updated, do not clear flags. During the next
199 // PrePaintTreeWalk, these flags will be used again. 191 // PrePaintTreeWalk, these flags will be used again.
200 object.getMutableForPainting().clearPaintFlags(); 192 object.getMutableForPainting().clearPaintFlags();
201 } 193 }
202 return descendantsFullyUpdated; 194 return descendantsFullyUpdated;
203 } 195 }
204 196
205 } // namespace blink 197 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698