Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h

Issue 1379883003: Create PaintChunk and begin writing code to build paint chunks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698