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

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: enable RuntimeEnabledFeature for PaintChunkerTest Created 5 years, 2 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 8827a61b67298d94e22d57b31d48b1859fa283dc..b473c93d473afff949de8b9adc669bd0279bc8fb 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.h
@@ -12,6 +12,8 @@
#include "platform/graphics/ContiguousContainer.h"
#include "platform/graphics/PaintInvalidationReason.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"
@@ -75,6 +77,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)
{
@@ -114,6 +121,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.
@@ -198,6 +208,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