| 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..eaccdd670580e1b952d27f725c620efa929aeb46 100644
|
| --- a/Source/platform/graphics/paint/DisplayItemList.h
|
| +++ b/Source/platform/graphics/paint/DisplayItemList.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "platform/PlatformExport.h"
|
| #include "platform/graphics/paint/DisplayItem.h"
|
| +#include "wtf/HashMap.h"
|
| #include "wtf/HashSet.h"
|
| #include "wtf/PassOwnPtr.h"
|
| #include "wtf/Vector.h"
|
| @@ -25,9 +26,12 @@ public:
|
|
|
| void endNewPaints() { updatePaintList(); }
|
|
|
| - const PaintList& paintList();
|
| + const PaintList& paintList() const;
|
| void add(WTF::PassOwnPtr<DisplayItem>);
|
|
|
| + const PaintList& newPaintListForTesting() const { return m_newPaints; }
|
| + const PaintList& oldPaintListForTesting() const { return m_paintList; }
|
| +
|
| void invalidate(DisplayItemClient);
|
| void invalidateAll();
|
| bool clientCacheIsValid(DisplayItemClient) const;
|
| @@ -43,17 +47,26 @@ protected:
|
| DisplayItemList() { };
|
|
|
| private:
|
| - PaintList::iterator findNextMatchingCachedItem(PaintList::iterator, const DisplayItem&);
|
| - bool wasInvalidated(const DisplayItem&) const;
|
| + size_t findMatchingCachedItem(const DisplayItem&);
|
| void updatePaintList();
|
|
|
| #ifndef NDEBUG
|
| WTF::String paintListAsDebugString(const PaintList&) const;
|
| #endif
|
|
|
| + typedef HashSet<DisplayItemClient> DisplayItemClientSet;
|
| + typedef HashMap<DisplayItem::Id, size_t> DisplayItemIndexMap;
|
| +
|
| + static void appendDisplayItem(WTF::PassOwnPtr<DisplayItem>, PaintList&, DisplayItemClientSet&, DisplayItemIndexMap&);
|
| + void copyCachedSubtree(const DisplayItem&, PaintList&, DisplayItemClientSet&, DisplayItemIndexMap&);
|
| +
|
| PaintList m_paintList;
|
| - HashSet<DisplayItemClient> m_cachedClients;
|
| + DisplayItemClientSet m_cachedClients;
|
| + DisplayItemIndexMap m_displayItemIndexMap;
|
| PaintList m_newPaints;
|
| +#if ENABLE(ASSERT)
|
| + HashSet<DisplayItem::Id> m_newPaintIds;
|
| +#endif
|
| };
|
|
|
| } // namespace blink
|
|
|