OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "platform/graphics/paint/DisplayItemList.h" | 6 #include "platform/graphics/paint/DisplayItemList.h" |
7 | 7 |
8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
9 #include "core/layout/LayoutText.h" | 9 #include "core/layout/LayoutText.h" |
10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 , m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint
V2Enabled()) { } | 63 , m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint
V2Enabled()) { } |
64 | 64 |
65 protected: | 65 protected: |
66 LayoutView& layoutView() { return *m_layoutView; } | 66 LayoutView& layoutView() { return *m_layoutView; } |
67 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph
icsLayerBacking()->displayItemList(); } | 67 DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graph
icsLayerBacking()->displayItemList(); } |
68 const DisplayItems& newDisplayItemsBeforeUpdate() { return rootDisplayItemLi
st().m_newDisplayItems; } | 68 const DisplayItems& newDisplayItemsBeforeUpdate() { return rootDisplayItemLi
st().m_newDisplayItems; } |
69 | 69 |
70 // Expose some document lifecycle steps for checking new display items befor
e commiting. | 70 // Expose some document lifecycle steps for checking new display items befor
e commiting. |
71 void updateLifecyclePhasesToPaintForSlimmingPaintV2Clean() | 71 void updateLifecyclePhasesToPaintForSlimmingPaintV2Clean() |
72 { | 72 { |
73 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp
ositingCleanPlusScrolling); | 73 document().view()->updateLifecyclePhasesInternal(FrameView::OnlyUpToComp
ositingCleanPlusScrolling, DocumentLifecycle::ThrottlingMode::Disallow); |
74 document().view()->invalidateTreeIfNeededRecursive(); | 74 document().view()->invalidateTreeIfNeededRecursive(); |
75 document().view()->paintForSlimmingPaintV2(); | 75 document().view()->paintForSlimmingPaintV2(); |
76 } | 76 } |
77 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming
PaintV2(); } | 77 void compositeForSlimmingPaintV2() { document().view()->compositeForSlimming
PaintV2(); } |
78 | 78 |
79 private: | 79 private: |
80 void SetUp() override | 80 void SetUp() override |
81 { | 81 { |
82 ASSERT_TRUE(RuntimeEnabledFeatures::slimmingPaintEnabled()); | 82 ASSERT_TRUE(RuntimeEnabledFeatures::slimmingPaintEnabled()); |
83 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); | 83 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 TestDisplayItem(content1, DisplayItem::BoxDecorationBackground), | 334 TestDisplayItem(content1, DisplayItem::BoxDecorationBackground), |
335 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | 335 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
336 TestDisplayItem(container2Layer, DisplayItem::BeginSubsequence), | 336 TestDisplayItem(container2Layer, DisplayItem::BeginSubsequence), |
337 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), | 337 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), |
338 TestDisplayItem(content2, DisplayItem::BoxDecorationBackground), | 338 TestDisplayItem(content2, DisplayItem::BoxDecorationBackground), |
339 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | 339 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
340 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence)); | 340 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence)); |
341 } | 341 } |
342 | 342 |
343 } // namespace blink | 343 } // namespace blink |
OLD | NEW |