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

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

Issue 2583733003: Use LayoutObject::subtreeNeedsPaintPropertyUpdate for printing invalidation (Closed)
Patch Set: - Created 3 years, 12 months 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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& parentContext) { 48 const PrePaintTreeWalkContext& parentContext) {
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 context(parentContext); 55 PrePaintTreeWalkContext context(parentContext);
56
57 if (frameView.shouldInvalidateAllPaintAndPaintProperties()) {
58 context.treeBuilderContext.forceSubtreeUpdate = true;
59 context.paintInvalidatorContext.forcedSubtreeInvalidationFlags |=
60 PaintInvalidatorContext::ForcedWholeTreeFullInvalidation;
61 frameView.clearShouldInvalidateAllPaintAndPaintProperties();
62 }
63
64 m_propertyTreeBuilder.updateProperties(frameView, context.treeBuilderContext); 56 m_propertyTreeBuilder.updateProperties(frameView, context.treeBuilderContext);
65 m_paintInvalidator.invalidatePaintIfNeeded(frameView, 57 m_paintInvalidator.invalidatePaintIfNeeded(frameView,
66 context.paintInvalidatorContext); 58 context.paintInvalidatorContext);
67 59
68 LayoutView* view = frameView.layoutView(); 60 LayoutView* view = frameView.layoutView();
69 bool descendantsFullyUpdated = view ? walk(*view, context) : true; 61 bool descendantsFullyUpdated = view ? walk(*view, context) : true;
70 if (descendantsFullyUpdated) { 62 if (descendantsFullyUpdated) {
71 #if DCHECK_IS_ON() 63 #if DCHECK_IS_ON()
72 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags(); 64 frameView.layoutView()->assertSubtreeClearedPaintInvalidationFlags();
73 #endif 65 #endif
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 179
188 if (descendantsFullyUpdated) { 180 if (descendantsFullyUpdated) {
189 // If descendants were not updated, do not clear flags. During the next 181 // If descendants were not updated, do not clear flags. During the next
190 // PrePaintTreeWalk, these flags will be used again. 182 // PrePaintTreeWalk, these flags will be used again.
191 object.getMutableForPainting().clearPaintFlags(); 183 object.getMutableForPainting().clearPaintFlags();
192 } 184 }
193 return descendantsFullyUpdated; 185 return descendantsFullyUpdated;
194 } 186 }
195 187
196 } // namespace blink 188 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698