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 DisplayList_h | |
6 #define DisplayList_h | |
7 | |
8 #include "platform/PlatformExport.h" | |
9 #include "platform/graphics/paint/DisplayItemList.h" | |
10 #include "public/platform/WebDisplayList.h" | |
11 #include "wtf/Vector.h" | |
12 | |
13 namespace blink { | |
14 | |
15 class DisplayList : public WebDisplayList { | |
16 public: | |
17 DisplayList(const DisplayItemList& displayItemList) : m_displayItemList(disp layItemList) { } | |
18 unsigned size() const override { return offsets.size(); } | |
19 const WebDisplayItem& displayItem(unsigned index) const | |
20 { | |
21 return *m_displayItemList.displayItems().elementAt(offsets[index]); | |
22 } | |
23 | |
24 // This is temporary. | |
25 const DisplayItem& displayItemInternal(unsigned index) const | |
26 { | |
27 return *m_displayItemList.displayItems().elementAt(offsets[index]); | |
28 } | |
29 Vector<unsigned> offsets; | |
weiliangc
2015/07/24 19:17:15
Maybe we should have more check to what we put int
chrishtr
2015/07/24 19:27:22
Yes. Getting these right is important.
| |
30 private: | |
31 const DisplayItemList& m_displayItemList; | |
32 }; | |
33 | |
34 } // namespace blink | |
35 | |
36 #endif // DisplayList_h | |
OLD | NEW |