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

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

Issue 2116693002: PaintChunk::id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: Address chrishtr's comments. Created 4 years, 5 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/PaintChunker.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h
index 2bf85b9efa43d776efda77a30dca9ab932c82260..fe3f6d6fe899b4c4fb8f89c823fa582f58bddbc5 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h
@@ -6,6 +6,7 @@
#define PaintChunker_h
#include "platform/PlatformExport.h"
+#include "platform/graphics/paint/DisplayItem.h"
#include "platform/graphics/paint/PaintChunk.h"
#include "platform/graphics/paint/PaintChunkProperties.h"
#include "wtf/Allocator.h"
@@ -21,23 +22,15 @@ class PLATFORM_EXPORT PaintChunker final {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(PaintChunker);
public:
- enum ItemBehavior {
- // Can be combined with adjacent items when building chunks.
- DefaultBehavior = 0,
-
- // Item requires its own paint chunk.
- RequiresSeparateChunk,
- };
-
PaintChunker();
~PaintChunker();
bool isInInitialState() const { return m_chunks.isEmpty() && m_currentProperties == PaintChunkProperties(); }
const PaintChunkProperties& currentPaintChunkProperties() const { return m_currentProperties; }
- void updateCurrentPaintChunkProperties(const PaintChunkProperties&);
+ void updateCurrentPaintChunkProperties(const PaintChunk::Id*, const PaintChunkProperties&);
- void incrementDisplayItemIndex(ItemBehavior);
+ void incrementDisplayItemIndex(const DisplayItem&);
void decrementDisplayItemIndex();
void clear();
@@ -47,8 +40,17 @@ public:
Vector<PaintChunk> releasePaintChunks();
private:
+ enum ItemBehavior {
+ // Can be combined with adjacent items when building chunks.
+ DefaultBehavior = 0,
+
+ // Item requires its own paint chunk.
+ RequiresSeparateChunk,
+ };
+
Vector<PaintChunk> m_chunks;
Vector<ItemBehavior> m_chunkBehavior;
+ Optional<PaintChunk::Id> m_currentChunkId;
PaintChunkProperties m_currentProperties;
};

Powered by Google App Engine
This is Rietveld 408576698