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

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

Issue 2804883006: Revert of Remove begin/end subseq. display items, and store on PaintController instead. (Closed)
Patch Set: Created 3 years, 8 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/PaintController.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
index 2fdedcadec122cc7de825f9d9fdf7f69f78c60a5..c4a237b1d6e75eaea937d0f397127885b4298220 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
@@ -109,11 +109,8 @@
// true. Otherwise returns false.
bool useCachedSubsequenceIfPossible(const DisplayItemClient&);
- void addCachedSubsequence(const DisplayItemClient&,
- unsigned start,
- unsigned end);
-
// True if the last display item is a begin that doesn't draw content.
+ bool lastDisplayItemIsNoopBegin() const;
void removeLastDisplayItem();
const DisplayItem* lastDisplayItem(unsigned offset);
@@ -196,17 +193,6 @@
paintChunksRasterInvalidationTrackingMap() {
return m_paintChunksRasterInvalidationTrackingMap.get();
}
-
-#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
- void beginShouldKeepAlive(const DisplayItemClient&);
-
- void beginSubsequence(const DisplayItemClient& client) {
- m_currentSubsequenceClients.push_back(&client);
- beginShouldKeepAlive(client);
- }
-
- void endSubsequence() { m_currentSubsequenceClients.pop_back(); }
-#endif
protected:
PaintController()
@@ -218,14 +204,14 @@
m_imagePainted(false),
m_skippingCacheCount(0),
m_numCachedNewItems(0),
- m_currentCachedSubsequenceBeginIndexInNewList(kNotFound),
+ m_currentCachedSubsequenceBeginIndexInNewList(kNotFound)
#ifndef NDEBUG
+ ,
m_numSequentialMatches(0),
m_numOutOfOrderMatches(0),
- m_numIndexedItems(0),
-#endif
- m_underInvalidationCheckingBegin(0),
- m_underInvalidationCheckingEnd(0) {
+ m_numIndexedItems(0)
+#endif
+ {
resetCurrentListIndices();
setTracksRasterInvalidations(
RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled());
@@ -234,8 +220,6 @@
private:
friend class PaintControllerTestBase;
friend class PaintControllerPaintTestBase;
-
- bool lastDisplayItemIsNoopBegin() const;
void ensureNewDisplayItemListInitialCapacity() {
if (m_newDisplayItemList.isEmpty()) {
@@ -268,7 +252,7 @@
size_t findCachedItem(const DisplayItem::Id&);
size_t findOutOfOrderCachedItemForward(const DisplayItem::Id&);
- void copyCachedSubsequence(size_t beginIndex, size_t endIndex);
+ void copyCachedSubsequence(size_t&);
// Resets the indices (e.g. m_nextItemToMatch) of
// m_currentPaintArtifact.getDisplayItemList() to their initial values. This
@@ -289,29 +273,11 @@
void showUnderInvalidationError(const char* reason,
const DisplayItem& newItem,
const DisplayItem* oldItem) const;
-
- void showSequenceUnderInvalidationError(const char* reason,
- const DisplayItemClient&,
- int start,
- int end);
-
void checkUnderInvalidation();
bool isCheckingUnderInvalidation() const {
return m_underInvalidationCheckingEnd - m_underInvalidationCheckingBegin >
0;
}
-
- struct SubsequenceMarkers {
- SubsequenceMarkers() : start(0), end(0) {}
- SubsequenceMarkers(size_t startArg, size_t endArg)
- : start(startArg), end(endArg) {}
- // The start and end index within m_currentPaintArtifact of this
- // subsequence.
- size_t start;
- size_t end;
- };
-
- SubsequenceMarkers* getSubsequenceMarkers(const DisplayItemClient&);
// The last complete paint artifact.
// In SPv2, this includes paint chunks as well as display items.
@@ -412,14 +378,6 @@
// A stack recording subsequence clients that are currently painting.
Vector<const DisplayItemClient*> m_currentSubsequenceClients;
#endif
-
- typedef HashMap<const DisplayItemClient*, SubsequenceMarkers>
- CachedSubsequenceMap;
- CachedSubsequenceMap m_currentCachedSubsequences;
- CachedSubsequenceMap m_newCachedSubsequences;
-
- FRIEND_TEST_ALL_PREFIXES(PaintControllerTest, CachedSubsequenceSwapOrder);
- FRIEND_TEST_ALL_PREFIXES(PaintControllerTest, CachedNestedSubsequenceUpdate);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698