OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DisplayItemList_h | |
6 #define DisplayItemList_h | |
7 | |
8 #include "platform/PlatformExport.h" | |
9 #include "platform/graphics/paint/DisplayItem.h" | |
10 #include "wtf/HashSet.h" | |
11 #include "wtf/PassOwnPtr.h" | |
12 #include "wtf/Vector.h" | |
13 | |
14 namespace blink { | |
15 | |
16 typedef Vector<OwnPtr<DisplayItem> > PaintList; | |
17 | |
18 class PLATFORM_EXPORT DisplayItemList { | |
19 WTF_MAKE_NONCOPYABLE(DisplayItemList); | |
20 public: | |
21 DisplayItemList() { }; | |
22 | |
23 const PaintList& paintList(); | |
24 void add(WTF::PassOwnPtr<DisplayItem>); | |
25 void invalidate(DisplayItemClient); | |
26 | |
27 #ifndef NDEBUG | |
28 void showDebugData() const; | |
29 #endif | |
30 | |
31 private: | |
32 PaintList::iterator findDisplayItem(PaintList::iterator, const DisplayItem&)
; | |
33 bool wasInvalidated(const DisplayItem&) const; | |
34 void updatePaintList(); | |
35 | |
36 PaintList m_paintList; | |
37 HashSet<DisplayItemClient> m_paintListRenderers; | |
38 HashSet<DisplayItemClient> m_invalidated; | |
39 PaintList m_newPaints; | |
40 }; | |
41 | |
42 } // namespace blink | |
43 | |
44 #endif // DisplayItemList_h | |
OLD | NEW |