| 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, FrameView::LifecycleThrottlingMode::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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 TestDisplayItem(content1, DisplayItem::BoxDecorationBackground), | 332 TestDisplayItem(content1, DisplayItem::BoxDecorationBackground), |
| 333 TestDisplayItem(container1, DisplayItem::EndSubsequence), | 333 TestDisplayItem(container1, DisplayItem::EndSubsequence), |
| 334 TestDisplayItem(container2, DisplayItem::BeginSubsequence), | 334 TestDisplayItem(container2, DisplayItem::BeginSubsequence), |
| 335 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), | 335 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), |
| 336 TestDisplayItem(content2, DisplayItem::BoxDecorationBackground), | 336 TestDisplayItem(content2, DisplayItem::BoxDecorationBackground), |
| 337 TestDisplayItem(container2, DisplayItem::EndSubsequence), | 337 TestDisplayItem(container2, DisplayItem::EndSubsequence), |
| 338 TestDisplayItem(html, DisplayItem::EndSubsequence)); | 338 TestDisplayItem(html, DisplayItem::EndSubsequence)); |
| 339 } | 339 } |
| 340 | 340 |
| 341 } // namespace blink | 341 } // namespace blink |
| OLD | NEW |