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

Unified Diff: third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp

Issue 1401363003: Rename DisplayItemList to PaintController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp
index 53153a913a80e4b477fbb1067447a3cf60a75b10..59591dbc90bd729116eca65425f096f1649d3996 100644
--- a/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/LayerClipRecorderTest.cpp
@@ -12,7 +12,7 @@
#include "core/paint/PaintLayer.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
-#include "platform/graphics/paint/DisplayItemList.h"
+#include "platform/graphics/paint/PaintController.h"
#include <gtest/gtest.h>
namespace blink {
@@ -25,7 +25,7 @@ public:
protected:
LayoutView& layoutView() { return *m_layoutView; }
- DisplayItemList& rootDisplayItemList() { return *layoutView().layer()->graphicsLayerBacking()->displayItemList(); }
+ PaintController& rootPaintController() { return *layoutView().layer()->graphicsLayerBacking()->paintController(); }
private:
void SetUp() override
@@ -60,26 +60,26 @@ void drawRectInClip(GraphicsContext& context, LayoutView& layoutView, PaintPhase
TEST_F(LayerClipRecorderTest, Single)
{
- GraphicsContext context(&rootDisplayItemList());
+ GraphicsContext context(&rootPaintController());
LayoutRect bound = layoutView().viewRect();
- EXPECT_EQ((size_t)0, rootDisplayItemList().displayItems().size());
+ EXPECT_EQ((size_t)0, rootPaintController().displayItems().size());
drawRectInClip(context, layoutView(), PaintPhaseForeground, bound);
- rootDisplayItemList().commitNewDisplayItems();
- EXPECT_EQ((size_t)3, rootDisplayItemList().displayItems().size());
- EXPECT_TRUE(DisplayItem::isClipType(rootDisplayItemList().displayItems()[0].type()));
- EXPECT_TRUE(DisplayItem::isDrawingType(rootDisplayItemList().displayItems()[1].type()));
- EXPECT_TRUE(DisplayItem::isEndClipType(rootDisplayItemList().displayItems()[2].type()));
+ rootPaintController().commitNewDisplayItems();
+ EXPECT_EQ((size_t)3, rootPaintController().displayItems().size());
+ EXPECT_TRUE(DisplayItem::isClipType(rootPaintController().displayItems()[0].type()));
+ EXPECT_TRUE(DisplayItem::isDrawingType(rootPaintController().displayItems()[1].type()));
+ EXPECT_TRUE(DisplayItem::isEndClipType(rootPaintController().displayItems()[2].type()));
}
TEST_F(LayerClipRecorderTest, Empty)
{
- GraphicsContext context(&rootDisplayItemList());
- EXPECT_EQ((size_t)0, rootDisplayItemList().displayItems().size());
+ GraphicsContext context(&rootPaintController());
+ EXPECT_EQ((size_t)0, rootPaintController().displayItems().size());
drawEmptyClip(context, layoutView(), PaintPhaseForeground);
- rootDisplayItemList().commitNewDisplayItems();
- EXPECT_EQ((size_t)0, rootDisplayItemList().displayItems().size());
+ rootPaintController().commitNewDisplayItems();
+ EXPECT_EQ((size_t)0, rootPaintController().displayItems().size());
}
}

Powered by Google App Engine
This is Rietveld 408576698