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

Side by Side Diff: third_party/WebKit/Source/core/paint/DisplayItemListPaintTest.h

Issue 1376143002: Add a document phase for calculating paint properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (remove GLB check, as was done in synchronizedPaint) Created 5 years, 2 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
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 #ifndef DisplayItemListPaintTest_h 5 #ifndef DisplayItemListPaintTest_h
6 #define DisplayItemListPaintTest_h 6 #define DisplayItemListPaintTest_h
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/LayoutTestHelper.h" 9 #include "core/layout/LayoutTestHelper.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void setNeedsDisplayWithoutInvalidationForRoot() 58 void setNeedsDisplayWithoutInvalidationForRoot()
59 { 59 {
60 layoutView().layer()->graphicsLayerBacking()->setNeedsDisplayWithoutInva lidateForTesting(); 60 layoutView().layer()->graphicsLayerBacking()->setNeedsDisplayWithoutInva lidateForTesting();
61 } 61 }
62 62
63 // Expose some document lifecycle steps for checking new display items befor e commiting. 63 // Expose some document lifecycle steps for checking new display items befor e commiting.
64 void updateLifecyclePhasesToPaintClean(const LayoutRect& interestRect = Layo utRect::infiniteRect()) 64 void updateLifecyclePhasesToPaintClean(const LayoutRect& interestRect = Layo utRect::infiniteRect())
65 { 65 {
66 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling); 66 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling);
67 document().view()->invalidateTreeIfNeededRecursive(); 67 document().view()->invalidateTreeIfNeededRecursive();
68 document().view()->calculatePaintProperties();
68 document().view()->synchronizedPaint(interestRect); 69 document().view()->synchronizedPaint(interestRect);
69 } 70 }
70 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); } 71 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); }
71 72
72 private: 73 private:
73 void SetUp() override 74 void SetUp() override
74 { 75 {
75 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); 76 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true);
76 77
77 RenderingTest::SetUp(); 78 RenderingTest::SetUp();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD rawingType(backgroundType); 123 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD rawingType(backgroundType);
123 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground); 124 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground);
124 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD rawingType(foregroundType); 125 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD rawingType(foregroundType);
125 const DisplayItem::Type subsequenceType = DisplayItem::SubsequenceNormalFlowAndP ositiveZOrder; 126 const DisplayItem::Type subsequenceType = DisplayItem::SubsequenceNormalFlowAndP ositiveZOrder;
126 const DisplayItem::Type endSubsequenceType = DisplayItem::subsequenceTypeToEndSu bsequenceType(subsequenceType); 127 const DisplayItem::Type endSubsequenceType = DisplayItem::subsequenceTypeToEndSu bsequenceType(subsequenceType);
127 const DisplayItem::Type cachedSubsequenceType = DisplayItem::subsequenceTypeToCa chedSubsequenceType(subsequenceType); 128 const DisplayItem::Type cachedSubsequenceType = DisplayItem::subsequenceTypeToCa chedSubsequenceType(subsequenceType);
128 129
129 } // namespace blink 130 } // namespace blink
130 131
131 #endif // DisplayItemListPaintTest_h 132 #endif // DisplayItemListPaintTest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698