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

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

Issue 2163113002: Remove DebugRedFill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ChunkId
Patch Set: Created 4 years, 5 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 PaintControllerPaintTest_h 5 #ifndef PaintControllerPaintTest_h
6 #define PaintControllerPaintTest_h 6 #define PaintControllerPaintTest_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 13 matching lines...) Expand all
24 { } 24 { }
25 25
26 protected: 26 protected:
27 LayoutView& layoutView() { return *document().layoutView(); } 27 LayoutView& layoutView() { return *document().layoutView(); }
28 PaintController& rootPaintController() { return layoutView().layer()->graphi csLayerBacking()->getPaintController(); } 28 PaintController& rootPaintController() { return layoutView().layer()->graphi csLayerBacking()->getPaintController(); }
29 29
30 void SetUp() override 30 void SetUp() override
31 { 31 {
32 RenderingTest::SetUp(); 32 RenderingTest::SetUp();
33 enableCompositing(); 33 enableCompositing();
34 GraphicsLayer::setDrawDebugRedFillForTesting(false);
35 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_enableSlimmingPaintV 2); 34 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_enableSlimmingPaintV 2);
36 } 35 }
37 void TearDown() override 36 void TearDown() override
38 { 37 {
39 RuntimeEnabledFeatures::setSlimmingPaintInvalidationEnabled(m_originalSl immingPaintInvalidationEnabled); 38 RuntimeEnabledFeatures::setSlimmingPaintInvalidationEnabled(m_originalSl immingPaintInvalidationEnabled);
40 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_originalSlimmingPain tV2Enabled); 39 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_originalSlimmingPain tV2Enabled);
41 GraphicsLayer::setDrawDebugRedFillForTesting(true);
42 } 40 }
43 41
44 bool paintWithoutCommit(const IntRect* interestRect = nullptr) 42 bool paintWithoutCommit(const IntRect* interestRect = nullptr)
45 { 43 {
46 // Only root graphics layer is supported. 44 // Only root graphics layer is supported.
47 document().view()->lifecycle().advanceTo(DocumentLifecycle::InPaint); 45 document().view()->lifecycle().advanceTo(DocumentLifecycle::InPaint);
48 if (!layoutView().layer()->graphicsLayerBacking()->paintWithoutCommit(in terestRect)) { 46 if (!layoutView().layer()->graphicsLayerBacking()->paintWithoutCommit(in terestRect)) {
49 document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintCle an); 47 document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintCle an);
50 return false; 48 return false;
51 } 49 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } while (false); 128 } while (false);
131 129
132 // Shorter names for frequently used display item types in tests. 130 // Shorter names for frequently used display item types in tests.
133 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; 131 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground;
134 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground); 132 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground);
135 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground ; 133 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground ;
136 134
137 } // namespace blink 135 } // namespace blink
138 136
139 #endif // PaintControllerPaintTest_h 137 #endif // PaintControllerPaintTest_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/FramePainter.cpp ('k') | third_party/WebKit/Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698