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

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

Issue 892293002: First version of new merge algorithm (not enabled yet) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase again again Created 5 years, 10 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
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/paint/DisplayItemList.h
diff --git a/Source/platform/graphics/paint/DisplayItemList.h b/Source/platform/graphics/paint/DisplayItemList.h
index c1949ad0a9d3f2bfdb2140a9089bf7e687794d61..b99e71aad6adfd59481d8498fb294badd2433d0c 100644
--- a/Source/platform/graphics/paint/DisplayItemList.h
+++ b/Source/platform/graphics/paint/DisplayItemList.h
@@ -7,7 +7,7 @@
#include "platform/PlatformExport.h"
#include "platform/graphics/paint/DisplayItem.h"
-#include "wtf/HashSet.h"
+#include "wtf/HashMap.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
@@ -43,16 +43,24 @@ protected:
DisplayItemList() { };
private:
- PaintList::iterator findNextMatchingCachedItem(PaintList::iterator, const DisplayItem&);
- bool wasInvalidated(const DisplayItem&) const;
+ friend class RenderDrawingRecorderTest;
+ friend class ViewDisplayListTest;
+
void updatePaintList();
#ifndef NDEBUG
WTF::String paintListAsDebugString(const PaintList&) const;
#endif
+ // Indices into PaintList of all DrawingDisplayItems and BeginSubtreeDisplayItems of each client.
+ typedef HashMap<DisplayItemClient, Vector<size_t>> DisplayItemIndicesByClientMap;
+
+ size_t findMatchingCachedItem(const DisplayItem&);
+ static void appendDisplayItem(PaintList&, DisplayItemIndicesByClientMap&, WTF::PassOwnPtr<DisplayItem>);
+ void copyCachedItems(const DisplayItem&, PaintList&, DisplayItemIndicesByClientMap&);
+
PaintList m_paintList;
- HashSet<DisplayItemClient> m_cachedClients;
+ DisplayItemIndicesByClientMap m_cachedDisplayItemIndicesByClient;
PaintList m_newPaints;
};
« no previous file with comments | « Source/platform/graphics/paint/DisplayItem.cpp ('k') | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698