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

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

Issue 2689213004: *** NOT FOR LANDING *** Paint investigations for bug 667370 (Closed)
Patch Set: Created 3 years, 10 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 19 matching lines...) Expand all
30 PaintInvalidatorContext paintInvalidatorContext; 30 PaintInvalidatorContext paintInvalidatorContext;
31 31
32 // The ancestor in the PaintLayer tree which has overflow clip, or 32 // The ancestor in the PaintLayer tree which has overflow clip, or
33 // is the root layer. Note that it is tree ancestor, not containing 33 // is the root layer. Note that it is tree ancestor, not containing
34 // block or stacking ancestor. 34 // block or stacking ancestor.
35 PaintLayer* ancestorOverflowPaintLayer; 35 PaintLayer* ancestorOverflowPaintLayer;
36 PaintLayer* ancestorTransformedOrRootPaintLayer; 36 PaintLayer* ancestorTransformedOrRootPaintLayer;
37 }; 37 };
38 38
39 void PrePaintTreeWalk::walk(FrameView& rootFrame) { 39 void PrePaintTreeWalk::walk(FrameView& rootFrame) {
40 TRACE_EVENT0("blink", "PrePaintTreeWalk::walk");
41
40 DCHECK(rootFrame.frame().document()->lifecycle().state() == 42 DCHECK(rootFrame.frame().document()->lifecycle().state() ==
41 DocumentLifecycle::InPrePaint); 43 DocumentLifecycle::InPrePaint);
42 44
43 PrePaintTreeWalkContext initialContext; 45 PrePaintTreeWalkContext initialContext;
44 initialContext.treeBuilderContext = 46 initialContext.treeBuilderContext =
45 m_propertyTreeBuilder.setupInitialContext(); 47 m_propertyTreeBuilder.setupInitialContext();
46 walk(rootFrame, initialContext); 48 walk(rootFrame, initialContext);
47 m_paintInvalidator.processPendingDelayedPaintInvalidations(); 49 m_paintInvalidator.processPendingDelayedPaintInvalidations();
48 } 50 }
49 51
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 200
199 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects(); 201 ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
200 202
201 if (!previousClipRects || *clipRects != *previousClipRects) { 203 if (!previousClipRects || *clipRects != *previousClipRects) {
202 paintLayer.setNeedsRepaint(); 204 paintLayer.setNeedsRepaint();
203 paintLayer.setPreviousPaintPhaseDescendantOutlinesEmpty(false); 205 paintLayer.setPreviousPaintPhaseDescendantOutlinesEmpty(false);
204 paintLayer.setPreviousPaintPhaseFloatEmpty(false); 206 paintLayer.setPreviousPaintPhaseFloatEmpty(false);
205 paintLayer.setPreviousPaintPhaseDescendantBlockBackgroundsEmpty(false); 207 paintLayer.setPreviousPaintPhaseDescendantBlockBackgroundsEmpty(false);
206 // All subsequences which are contained below this paintLayer must also 208 // All subsequences which are contained below this paintLayer must also
207 // be checked. 209 // be checked.
208 context.forceSubtreeUpdate = true; 210 // context.forceSubtreeUpdate = true;
209 } 211 }
210 212
211 paintLayer.setPreviousPaintingClipRects(*clipRects); 213 paintLayer.setPreviousPaintingClipRects(*clipRects);
212 } 214 }
213 215
214 void PrePaintTreeWalk::walk(const LayoutObject& object, 216 void PrePaintTreeWalk::walk(const LayoutObject& object,
215 const PrePaintTreeWalkContext& parentContext) { 217 const PrePaintTreeWalkContext& parentContext) {
216 PrePaintTreeWalkContext context(parentContext); 218 PrePaintTreeWalkContext context(parentContext);
217 219
218 // This must happen before updateContextForBoxPosition, because the 220 // This must happen before updateContextForBoxPosition, because the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 roundedIntPoint(context.treeBuilderContext.current.paintOffset); 276 roundedIntPoint(context.treeBuilderContext.current.paintOffset);
275 walk(*toFrameView(widget), context); 277 walk(*toFrameView(widget), context);
276 } 278 }
277 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). 279 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281).
278 } 280 }
279 281
280 object.getMutableForPainting().clearPaintFlags(); 282 object.getMutableForPainting().clearPaintFlags();
281 } 283 }
282 284
283 } // namespace blink 285 } // 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