Chromium Code Reviews| Index: Source/platform/graphics/paint/DisplayItem.h |
| diff --git a/Source/platform/graphics/paint/DisplayItem.h b/Source/platform/graphics/paint/DisplayItem.h |
| index ed8985384fd6aee80bffa12ab56447a5271950e0..ecdbd12c3c65fa1a4a81c66d64f443f50529e16e 100644 |
| --- a/Source/platform/graphics/paint/DisplayItem.h |
| +++ b/Source/platform/graphics/paint/DisplayItem.h |
| @@ -18,6 +18,7 @@ |
| namespace blink { |
| +class DisplayItems; |
| class GraphicsContext; |
| class WebDisplayItemList; |
| @@ -233,6 +234,7 @@ public: |
| bool skippedCache() const { return m_skippedCache; } |
| virtual void appendToWebDisplayItemList(WebDisplayItemList*) const { } |
| + virtual void appendByMoving(DisplayItems&) = 0; |
| // See comments of enum Type for usage of the following macros. |
| #define DEFINE_CATEGORY_METHODS(Category) \ |
| @@ -355,6 +357,27 @@ private: |
| virtual bool isEnd() const override final { return true; } |
| }; |
| +// Allows a DisplayItemClientWrapper to be constructed from a DisplayItem, in |
| +// order to facilitate copying it. |
| +// TODO(jbroman): This is a bad class name. |
| +class DisplayItemClientWrapperHelper { |
|
Xianzhu
2015/06/19 16:19:11
I think we can just use DisplayItemClientWrapper i
|
| + DISALLOW_ALLOCATION(); |
| +public: |
| + DisplayItemClientWrapperHelper(const DisplayItem& wrapped) : m_wrapped(wrapped) { } |
| + DisplayItemClient displayItemClient() const { return m_wrapped.client(); } |
| + String debugName() const |
| + { |
| +#ifndef NDEBUG |
| + return m_wrapped.clientDebugString(); |
| +#else |
| + return String(); |
| +#endif |
| + } |
| +private: |
| + const DisplayItem& m_wrapped; |
| +}; |
| + |
| + |
| } // namespace blink |
| #endif // DisplayItem_h |