Chromium Code Reviews| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 layoutView().layer()->graphicsLayerBacking()->setNeedsDisplay(); | 56 layoutView().layer()->graphicsLayerBacking()->setNeedsDisplay(); |
| 57 } | 57 } |
| 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(LayoutRect::infiniteIntRect())) | 64 void updateLifecyclePhasesToPaintClean(const LayoutRect& interestRect = Layo utRect(LayoutRect::infiniteIntRect())) |
| 65 { | 65 { |
| 66 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling, nullptr); | 66 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp ositingCleanPlusScrolling, DocumentLifecycle::ThrottlingMode::Disallow, nullptr) ; |
|
esprehn
2015/10/14 22:09:46
ditto
Sami
2015/10/16 16:48:09
Done.
| |
| 67 document().view()->invalidateTreeIfNeededRecursive(); | 67 document().view()->invalidateTreeIfNeededRecursive(); |
| 68 document().view()->updatePaintProperties(); | 68 document().view()->updatePaintProperties(); |
| 69 document().view()->synchronizedPaint(&interestRect); | 69 document().view()->synchronizedPaint(&interestRect); |
| 70 } | 70 } |
| 71 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); } | 71 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming PaintV2(); } |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 void SetUp() override | 74 void SetUp() override |
| 75 { | 75 { |
| 76 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); | 76 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD rawingType(backgroundType); | 123 const DisplayItem::Type cachedBackgroundType = DisplayItem::drawingTypeToCachedD rawingType(backgroundType); |
| 124 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground); | 124 const DisplayItem::Type foregroundType = DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground); |
| 125 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD rawingType(foregroundType); | 125 const DisplayItem::Type cachedForegroundType = DisplayItem::drawingTypeToCachedD rawingType(foregroundType); |
| 126 const DisplayItem::Type subsequenceType = DisplayItem::SubsequenceNormalFlowAndP ositiveZOrder; | 126 const DisplayItem::Type subsequenceType = DisplayItem::SubsequenceNormalFlowAndP ositiveZOrder; |
| 127 const DisplayItem::Type endSubsequenceType = DisplayItem::subsequenceTypeToEndSu bsequenceType(subsequenceType); | 127 const DisplayItem::Type endSubsequenceType = DisplayItem::subsequenceTypeToEndSu bsequenceType(subsequenceType); |
| 128 const DisplayItem::Type cachedSubsequenceType = DisplayItem::subsequenceTypeToCa chedSubsequenceType(subsequenceType); | 128 const DisplayItem::Type cachedSubsequenceType = DisplayItem::subsequenceTypeToCa chedSubsequenceType(subsequenceType); |
| 129 | 129 |
| 130 } // namespace blink | 130 } // namespace blink |
| 131 | 131 |
| 132 #endif // PaintControllerPaintTest_h | 132 #endif // PaintControllerPaintTest_h |
| OLD | NEW |