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

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

Issue 2277443003: [SPv2] Rasterization invalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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 511eb70de1408b9dde67d13f1d044999aeaa4c42..2ea786182599e20efa5fe9123f08894a9e5fc13d 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.h
@@ -30,10 +30,14 @@ public:
const PaintChunkProperties& currentPaintChunkProperties() const { return m_currentProperties; }
void updateCurrentPaintChunkProperties(const PaintChunk::Id*, const PaintChunkProperties&);
- void incrementDisplayItemIndex(const DisplayItem&);
- void decrementDisplayItemIndex();
+ // Returns true if a new chunk is created.
+ bool incrementDisplayItemIndex(const DisplayItem&);
+ // Returns true if the last chunk is removed.
+ bool decrementDisplayItemIndex();
- const PaintChunk& lastChunk() const { return m_chunks.last(); }
+ PaintChunk& paintChunkAt(size_t i) { return m_chunks[i]; }
+ size_t lastChunkIndex() const { return m_chunks.isEmpty() ? kNotFound : m_chunks.size() - 1; }
+ PaintChunk& lastChunk() { return m_chunks.last(); }
void clear();

Powered by Google App Engine
This is Rietveld 408576698