| Index: Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| diff --git a/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp b/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| index aeff937d83552c99d243ce8be0cdf6f8749fd0f1..139554fd921e89b5208ec8c1fe66cd1c588744e1 100644
|
| --- a/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| +++ b/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| @@ -26,9 +26,30 @@ struct DummyClient {
|
|
|
| class DummyDisplayItem : public DisplayItem {
|
| public:
|
| - static PassOwnPtr<DummyDisplayItem> create(const DummyClient& client) { return adoptPtr(new DummyDisplayItem(client)); }
|
| -private:
|
| - DummyDisplayItem(const DummyClient& client) : DisplayItem(client, DisplayItem::DrawingFirst) { }
|
| + DummyDisplayItem(DummyClient client)
|
| + {
|
| + DisplayItemClientWrapper clientWrapper(client);
|
| + setClientAndType(clientWrapper, DisplayItem::DrawingFirst);
|
| + }
|
| +};
|
| +
|
| +class TestBeginTransform3DDisplayItem : public BeginTransform3DDisplayItem {
|
| +public:
|
| + TestBeginTransform3DDisplayItem(DummyClient client, DisplayItem::Type type, TransformationMatrix transform)
|
| + {
|
| + DisplayItemClientWrapper clientWrapper(client);
|
| + setClientAndType(clientWrapper, type);
|
| + setNew(transform);
|
| + }
|
| +};
|
| +
|
| +class TestEndTransform3DDisplayItem : public EndTransform3DDisplayItem {
|
| +public:
|
| + TestEndTransform3DDisplayItem(DummyClient client, DisplayItem::Type type)
|
| + {
|
| + DisplayItemClientWrapper clientWrapper(client);
|
| + setClientAndType(clientWrapper, type);
|
| + }
|
| };
|
|
|
| class DisplayItemTransformTreeBuilderTest : public ::testing::Test {
|
| @@ -37,16 +58,16 @@ protected:
|
|
|
| void processDisplayItem(const DisplayItem& displayItem) { m_builder.processDisplayItem(displayItem); }
|
| void processDisplayItem(PassOwnPtr<DisplayItem> displayItem) { processDisplayItem(*displayItem); }
|
| - void processDummyDisplayItem() { processDisplayItem(DummyDisplayItem::create(newDummyClient())); }
|
| + void processDummyDisplayItem() { processDisplayItem(DummyDisplayItem(newDummyClient())); }
|
| const DummyClient& processBeginTransform3D(const TransformationMatrix& transform)
|
| {
|
| const DummyClient& client = newDummyClient();
|
| - processDisplayItem(BeginTransform3DDisplayItem::create(client, DisplayItem::Transform3DElementTransform, transform));
|
| + processDisplayItem(TestBeginTransform3DDisplayItem(client, DisplayItem::Transform3DElementTransform, transform));
|
| return client;
|
| }
|
| void processEndTransform3D(const DummyClient& client)
|
| {
|
| - processDisplayItem(EndTransform3DDisplayItem::create(client, DisplayItem::transform3DTypeToEndTransform3DType(DisplayItem::Transform3DElementTransform)));
|
| + processDisplayItem(TestEndTransform3DDisplayItem(client, DisplayItem::transform3DTypeToEndTransform3DType(DisplayItem::Transform3DElementTransform)));
|
| }
|
|
|
| private:
|
|
|