Index: Source/platform/graphics/paint/DisplayItemList.h |
diff --git a/Source/platform/graphics/paint/DisplayItemList.h b/Source/platform/graphics/paint/DisplayItemList.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7aaac2bf46ad8d59a7d014ee43e4f0d48f1876e8 |
--- /dev/null |
+++ b/Source/platform/graphics/paint/DisplayItemList.h |
@@ -0,0 +1,44 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef DisplayItemList_h |
+#define DisplayItemList_h |
+ |
+#include "platform/PlatformExport.h" |
+#include "platform/graphics/paint/DisplayItem.h" |
+#include "wtf/HashSet.h" |
+#include "wtf/PassOwnPtr.h" |
+#include "wtf/Vector.h" |
+ |
+namespace blink { |
+ |
+typedef Vector<OwnPtr<DisplayItem> > PaintList; |
+ |
+class PLATFORM_EXPORT DisplayItemList { |
+ WTF_MAKE_NONCOPYABLE(DisplayItemList); |
+public: |
+ DisplayItemList() { }; |
+ |
+ const PaintList& paintList(); |
+ void add(WTF::PassOwnPtr<DisplayItem>); |
+ void invalidate(DisplayItemClient); |
+ |
+#ifndef NDEBUG |
+ void showDebugData() const; |
+#endif |
+ |
+private: |
+ PaintList::iterator findDisplayItem(PaintList::iterator, const DisplayItem&); |
+ bool wasInvalidated(const DisplayItem&) const; |
+ void updatePaintList(); |
+ |
+ PaintList m_paintList; |
+ HashSet<DisplayItemClient> m_paintListRenderers; |
+ HashSet<DisplayItemClient> m_invalidated; |
+ PaintList m_newPaints; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // DisplayItemList_h |