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

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

Issue 860563003: Disable display item caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 11 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
Index: Source/core/paint/DrawingRecorderTest.cpp
diff --git a/Source/core/paint/DrawingRecorderTest.cpp b/Source/core/paint/DrawingRecorderTest.cpp
index ccb87dca70b3cd51780128ce26bb8869ebc0201c..9ec33bb16ded27a3840bdcba6e2e185016208a7a 100644
--- a/Source/core/paint/DrawingRecorderTest.cpp
+++ b/Source/core/paint/DrawingRecorderTest.cpp
@@ -60,7 +60,9 @@ TEST_F(DrawingRecorderTest, DrawingRecorderTest_Nothing)
FloatRect bound = renderView()->viewRect();
EXPECT_EQ((size_t)0, rootDisplayItemList().paintList().size());
+ rootDisplayItemList().beginNewPaints();
drawNothing(&context, renderView(), PaintPhaseForeground, bound);
+ rootDisplayItemList().endNewPaints();
EXPECT_EQ((size_t)1, rootDisplayItemList().paintList().size());
#ifndef NDEBUG
EXPECT_STREQ("Dummy", rootDisplayItemList().paintList()[0]->name());
@@ -71,7 +73,9 @@ TEST_F(DrawingRecorderTest, DrawingRecorderTest_Rect)
{
GraphicsContext context(nullptr, &rootDisplayItemList());
FloatRect bound = renderView()->viewRect();
+ rootDisplayItemList().beginNewPaints();
drawRect(&context, renderView(), PaintPhaseForeground, bound);
+ rootDisplayItemList().endNewPaints();
EXPECT_EQ((size_t)1, rootDisplayItemList().paintList().size());
#ifndef NDEBUG
EXPECT_STREQ("Drawing", rootDisplayItemList().paintList()[0]->name());
@@ -82,16 +86,20 @@ TEST_F(DrawingRecorderTest, DrawingRecorderTest_Cached)
{
GraphicsContext context(nullptr, &rootDisplayItemList());
FloatRect bound = renderView()->viewRect();
+ rootDisplayItemList().beginNewPaints();
drawNothing(&context, renderView(), PaintPhaseBlockBackground, bound);
drawRect(&context, renderView(), PaintPhaseForeground, bound);
+ rootDisplayItemList().endNewPaints();
EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size());
#ifndef NDEBUG
EXPECT_STREQ("Dummy", rootDisplayItemList().paintList()[0]->name());
EXPECT_STREQ("Drawing", rootDisplayItemList().paintList()[1]->name());
#endif
+ rootDisplayItemList().beginNewPaints();
drawNothing(&context, renderView(), PaintPhaseBlockBackground, bound);
drawRect(&context, renderView(), PaintPhaseForeground, bound);
+ rootDisplayItemList().endNewPaints();
EXPECT_EQ((size_t)2, rootDisplayItemList().paintList().size());
#ifndef NDEBUG
EXPECT_STREQ("Dummy", rootDisplayItemList().paintList()[0]->name());
« no previous file with comments | « no previous file | Source/core/paint/LayerClipRecorderTest.cpp » ('j') | Source/platform/graphics/paint/DisplayItemList.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698