| 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..8de966660c9f50299eea9a99c65d66afa0f65a97 100644
|
| --- a/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| +++ b/Source/platform/graphics/paint/DisplayItemTransformTreeBuilderTest.cpp
|
| @@ -8,6 +8,7 @@
|
| #include "platform/graphics/paint/DisplayItem.h"
|
| #include "platform/graphics/paint/DisplayItemClient.h"
|
| #include "platform/graphics/paint/DisplayItemTransformTree.h"
|
| +#include "platform/graphics/paint/DisplayItems.h"
|
| #include "platform/graphics/paint/Transform3DDisplayItem.h"
|
| #include "platform/transforms/TransformTestHelper.h"
|
| #include "platform/transforms/TransformationMatrix.h"
|
| @@ -26,9 +27,15 @@ struct DummyClient {
|
|
|
| class DummyDisplayItem : public DisplayItem {
|
| public:
|
| - static PassOwnPtr<DummyDisplayItem> create(const DummyClient& client) { return adoptPtr(new DummyDisplayItem(client)); }
|
| + DummyDisplayItem(const DummyClient& client) : DisplayItem(client, DisplayItem::DrawingFirst), m_dummyClient(client) { }
|
| +
|
| + void appendByMoving(DisplayItems& destination) override
|
| + {
|
| + destination.emplaceBack<DummyDisplayItem>(m_dummyClient);
|
| + }
|
| +
|
| private:
|
| - DummyDisplayItem(const DummyClient& client) : DisplayItem(client, DisplayItem::DrawingFirst) { }
|
| + const DummyClient& m_dummyClient;
|
| };
|
|
|
| class DisplayItemTransformTreeBuilderTest : public ::testing::Test {
|
| @@ -37,16 +44,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(adoptPtr(new DummyDisplayItem(newDummyClient()))); }
|
| const DummyClient& processBeginTransform3D(const TransformationMatrix& transform)
|
| {
|
| const DummyClient& client = newDummyClient();
|
| - processDisplayItem(BeginTransform3DDisplayItem::create(client, DisplayItem::Transform3DElementTransform, transform));
|
| + processDisplayItem(adoptPtr(new BeginTransform3DDisplayItem(client, DisplayItem::Transform3DElementTransform, transform)));
|
| return client;
|
| }
|
| void processEndTransform3D(const DummyClient& client)
|
| {
|
| - processDisplayItem(EndTransform3DDisplayItem::create(client, DisplayItem::transform3DTypeToEndTransform3DType(DisplayItem::Transform3DElementTransform)));
|
| + processDisplayItem(adoptPtr(new EndTransform3DDisplayItem(client, DisplayItem::transform3DTypeToEndTransform3DType(DisplayItem::Transform3DElementTransform))));
|
| }
|
|
|
| private:
|
|
|