OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintClean); | 76 document().view()->lifecycle().advanceTo(DocumentLifecycle::PaintClean); |
77 } | 77 } |
78 | 78 |
79 void paint(const IntRect* interestRect = nullptr) | 79 void paint(const IntRect* interestRect = nullptr) |
80 { | 80 { |
81 // Only root graphics layer is supported. | 81 // Only root graphics layer is supported. |
82 if (paintWithoutCommit(interestRect)) | 82 if (paintWithoutCommit(interestRect)) |
83 commit(); | 83 commit(); |
84 } | 84 } |
85 | 85 |
| 86 bool displayItemListContains(const DisplayItemList& displayItemList, Display
ItemClient& client, DisplayItem::Type type) |
| 87 { |
| 88 for (auto& item : displayItemList) { |
| 89 if (item.client() == client && item.type() == type) |
| 90 return true; |
| 91 } |
| 92 return false; |
| 93 } |
| 94 |
86 private: | 95 private: |
87 bool m_originalSlimmingPaintOffsetCachingEnabled; | 96 bool m_originalSlimmingPaintOffsetCachingEnabled; |
88 bool m_originalSlimmingPaintV2Enabled; | 97 bool m_originalSlimmingPaintV2Enabled; |
89 bool m_enableSlimmingPaintV2; | 98 bool m_enableSlimmingPaintV2; |
90 }; | 99 }; |
91 | 100 |
92 class PaintControllerPaintTest : public PaintControllerPaintTestBase { | 101 class PaintControllerPaintTest : public PaintControllerPaintTestBase { |
93 public: | 102 public: |
94 PaintControllerPaintTest() : PaintControllerPaintTestBase(false) { } | 103 PaintControllerPaintTest() : PaintControllerPaintTestBase(false) { } |
95 }; | 104 }; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; | 148 const DisplayItem::Type backgroundType = DisplayItem::BoxDecorationBackground; |
140 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); | 149 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD
rawingType(backgroundType); |
141 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); | 150 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa
intPhaseForeground); |
142 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); | 151 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD
rawingType(foregroundType); |
143 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground
; | 152 const DisplayItem::Type documentBackgroundType = DisplayItem::DocumentBackground
; |
144 const DisplayItem::Type cachedDocumentBackgroundType = DisplayItem::drawingTypeT
oCachedDrawingType(DisplayItem::DocumentBackground); | 153 const DisplayItem::Type cachedDocumentBackgroundType = DisplayItem::drawingTypeT
oCachedDrawingType(DisplayItem::DocumentBackground); |
145 | 154 |
146 } // namespace blink | 155 } // namespace blink |
147 | 156 |
148 #endif // PaintControllerPaintTest_h | 157 #endif // PaintControllerPaintTest_h |
OLD | NEW |