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

Unified Diff: Source/core/paint/DisplayItemListPaintTest.cpp

Issue 1282713003: Painter side preparation for subtree caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: needsSubtreeRecorder Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/SubtreeRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DisplayItemListPaintTest.cpp
diff --git a/Source/core/paint/DisplayItemListPaintTest.cpp b/Source/core/paint/DisplayItemListPaintTest.cpp
index 98ab81391bdd2ee998737530fd89da9bd23e1829..4a9f008783518b5926bf2dc0426d9e7d778a8586 100644
--- a/Source/core/paint/DisplayItemListPaintTest.cpp
+++ b/Source/core/paint/DisplayItemListPaintTest.cpp
@@ -27,7 +27,7 @@ class DisplayItemListPaintTest : public RenderingTest {
public:
DisplayItemListPaintTest()
: m_layoutView(nullptr)
- , m_originalSlimmingPaintEnabled(RuntimeEnabledFeatures::slimmingPaintEnabled()) { }
+ , m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { }
protected:
LayoutView& layoutView() { return *m_layoutView; }
@@ -37,7 +37,8 @@ protected:
private:
void SetUp() override
{
- RuntimeEnabledFeatures::setSlimmingPaintEnabled(true);
+ ASSERT_TRUE(RuntimeEnabledFeatures::slimmingPaintEnabled());
+ RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true);
RenderingTest::SetUp();
enableCompositing();
@@ -48,11 +49,11 @@ private:
void TearDown() override
{
- RuntimeEnabledFeatures::setSlimmingPaintEnabled(m_originalSlimmingPaintEnabled);
+ RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_originalSlimmingPaintV2Enabled);
}
LayoutView* m_layoutView;
- bool m_originalSlimmingPaintEnabled;
+ bool m_originalSlimmingPaintV2Enabled;
};
class TestDisplayItem : public DisplayItem {
@@ -150,10 +151,12 @@ TEST_F(DisplayItemListPaintTest, InlineRelayout)
InlineTextBox& newFirstTextBox = *newText.firstTextBox();
InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
- EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 3,
+ EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 5,
TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground),
+ TestDisplayItem(divBlock, DisplayItem::paintPhaseToBeginSubtreeType(PaintPhaseForeground)),
TestDisplayItem(newFirstTextBox, DisplayItem::paintPhaseToDrawingType(PaintPhaseForeground)),
- TestDisplayItem(secondTextBox, DisplayItem::paintPhaseToDrawingType(PaintPhaseForeground)));
+ TestDisplayItem(secondTextBox, DisplayItem::paintPhaseToDrawingType(PaintPhaseForeground)),
+ TestDisplayItem(divBlock, DisplayItem::paintPhaseToEndSubtreeType(PaintPhaseForeground)));
}
} // namespace blink
« no previous file with comments | « Source/core/paint/BlockPainter.cpp ('k') | Source/core/paint/SubtreeRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698