| Index: Source/platform/graphics/paint/CachedDisplayItem.h
|
| diff --git a/Source/platform/graphics/paint/CachedDisplayItem.h b/Source/platform/graphics/paint/CachedDisplayItem.h
|
| index c5d55359352059aa32400ec138328f8202bf3ab9..706235dc2fee9dedaaf657cc2bc0e13250bd2605 100644
|
| --- a/Source/platform/graphics/paint/CachedDisplayItem.h
|
| +++ b/Source/platform/graphics/paint/CachedDisplayItem.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CachedDisplayItem_h
|
| #define CachedDisplayItem_h
|
|
|
| +#include "platform/geometry/FloatRect.h"
|
| #include "platform/graphics/paint/DisplayItem.h"
|
| #include "wtf/Assertions.h"
|
|
|
| @@ -21,17 +22,34 @@ public:
|
| return adoptPtr(new CachedDisplayItem(client, type));
|
| }
|
|
|
| +#ifndef NDEBUG
|
| + static PassOwnPtr<CachedDisplayItem> create(DisplayItemClient client, Type type, const FloatRect& bounds)
|
| + {
|
| + return adoptPtr(new CachedDisplayItem(client, type, bounds));
|
| + }
|
| +#endif
|
| +
|
| virtual bool isCached() const { return true; }
|
|
|
| private:
|
| CachedDisplayItem(DisplayItemClient client, Type type) : DisplayItem(client, type) { }
|
|
|
| +#ifdef NDEBUG
|
| // CachedDisplayItem is never replayed or appended to WebDisplayItemList.
|
| - virtual void replay(GraphicsContext*) override final { ASSERT_NOT_REACHED(); }
|
| - virtual void appendToWebDisplayItemList(WebDisplayItemList*) const override final { ASSERT_NOT_REACHED(); }
|
| + virtual void replay(GraphicsContext*) final { ASSERT_NOT_REACHED(); }
|
| + virtual void appendToWebDisplayItemList(WebDisplayItemList*) const final { ASSERT_NOT_REACHED(); }
|
| +#else
|
| + CachedDisplayItem(DisplayItemClient client, Type type, const FloatRect& bounds)
|
| + : DisplayItem(client, type)
|
| + , m_bounds(bounds) { }
|
| +
|
| + // Generates red rectangle to indicate under-invalidation errors.
|
| + virtual void replay(GraphicsContext*) final;
|
| + virtual void appendToWebDisplayItemList(WebDisplayItemList*) const final;
|
|
|
| -#ifndef NDEBUG
|
| virtual const char* name() const override { return "Cached"; }
|
| +
|
| + const FloatRect m_bounds;
|
| #endif
|
| };
|
|
|
|
|