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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(layoutView.displayItemC lient())); 143 EXPECT_TRUE(rootDisplayItemList().clientCacheIsValid(layoutView.displayItemC lient()));
144 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(divBlock.displayItemCl ient())); 144 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(divBlock.displayItemCl ient()));
145 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(firstTextBoxDisplayIte mClient)); 145 EXPECT_FALSE(rootDisplayItemList().clientCacheIsValid(firstTextBoxDisplayIte mClient));
146 DeprecatedPaintLayerPainter(rootLayer).paintLayerContents(&context, painting Info, PaintLayerPaintingCompositingAllPhases); 146 DeprecatedPaintLayerPainter(rootLayer).paintLayerContents(&context, painting Info, PaintLayerPaintingCompositingAllPhases);
147 rootDisplayItemList().commitNewDisplayItems(); 147 rootDisplayItemList().commitNewDisplayItems();
148 148
149 LayoutText& newText = *toLayoutText(divBlock.firstChild()); 149 LayoutText& newText = *toLayoutText(divBlock.firstChild());
150 InlineTextBox& newFirstTextBox = *newText.firstTextBox(); 150 InlineTextBox& newFirstTextBox = *newText.firstTextBox();
151 InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox(); 151 InlineTextBox& secondTextBox = *newText.firstTextBox()->nextTextBox();
152 152
153 EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 3, 153 EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 5,
154 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground), 154 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground),
155 TestDisplayItem(divBlock, DisplayItem::paintPhaseToBeginSubtreeType(Pain tPhaseForeground)),
155 TestDisplayItem(newFirstTextBox, DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground)), 156 TestDisplayItem(newFirstTextBox, DisplayItem::paintPhaseToDrawingType(Pa intPhaseForeground)),
156 TestDisplayItem(secondTextBox, DisplayItem::paintPhaseToDrawingType(Pain tPhaseForeground))); 157 TestDisplayItem(secondTextBox, DisplayItem::paintPhaseToDrawingType(Pain tPhaseForeground)),
158 TestDisplayItem(divBlock, DisplayItem::paintPhaseToEndSubtreeType(PaintP haseForeground)));
157 } 159 }
158 160
159 } // namespace blink 161 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698