| 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..4feab87ac61056353652524eeb5025cb9720d622 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) \
|
| @@ -333,6 +335,10 @@ private:
|
| #ifndef NDEBUG
|
| WTF::String m_clientDebugString;
|
| #endif
|
| +
|
| + // TODO(jbroman): Copying this data in appendByMoving would be better than
|
| + // friendship, but this is just hacked up.
|
| + friend class DisplayItems;
|
| };
|
|
|
| class PLATFORM_EXPORT PairedBeginDisplayItem : public DisplayItem {
|
| @@ -355,6 +361,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 {
|
| + 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
|
|
|