Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
index e4a0ab1f35d39d51ce278d56c312f4315719ca3f..81638e0c8bb28c7541150b0b6391d1ebdaf0c34b 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h |
@@ -10,6 +10,8 @@ |
#include "platform/geometry/LayoutPoint.h" |
#include "platform/graphics/ContiguousContainer.h" |
#include "platform/graphics/paint/DisplayItem.h" |
+#include "platform/graphics/paint/PaintChunk.h" |
+#include "platform/graphics/paint/PaintChunker.h" |
#include "platform/graphics/paint/Transform3DDisplayItem.h" |
#include "wtf/Alignment.h" |
#include "wtf/HashMap.h" |
@@ -19,6 +21,8 @@ |
namespace blink { |
+class CachedDisplayItem; |
+class DrawingDisplayItem; |
class GraphicsContext; |
// kDisplayItemAlignment must be a multiple of alignof(derived display item) for |
@@ -76,6 +80,11 @@ public: |
#endif |
// These methods are called during painting. |
+ |
+ // Provide a new set of paint properties to apply to recorded display items, |
+ // for Slimming Paint v2. |
+ void updateCurrentPaintProperties(const PaintProperties&); |
+ |
template <typename DisplayItemClass, typename... Args> |
DisplayItemClass& createAndAppend(Args&&... args) |
{ |
@@ -115,6 +124,9 @@ public: |
// Get the paint list generated after the last painting. |
const DisplayItems& displayItems() const; |
+ // Get the paint chunks generated after the last painting. |
+ const Vector<PaintChunk>& paintChunks() const; |
+ |
bool clientCacheIsValid(DisplayItemClient) const; |
// Commits the new display items and plays back the updated display items into the given context. |
@@ -199,6 +211,12 @@ private: |
DisplayItems m_currentDisplayItems; |
DisplayItems m_newDisplayItems; |
+ // In Slimming Paint v2, paint properties (e.g. transform) useful for |
+ // compositing are stored in corresponding paint chunks instead of in the |
+ // display items. |
+ Vector<PaintChunk> m_currentPaintChunks; |
+ PaintChunker m_newPaintChunks; |
+ |
// Contains all clients having valid cached paintings if updated. |
// It's lazily updated in updateValidlyCachedClientsIfNeeded(). |
// FIXME: In the future we can replace this with client-side repaint flags |