OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ | |
6 #define CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 #include "base/memory/ref_counted.h" | |
13 #include "base/trace_event/trace_event.h" | |
14 #include "cc/debug/traced_value.h" | |
15 | |
16 namespace cc { | |
17 | |
18 class DisplayItemList; | |
19 | |
20 class TracedDisplayItemList | |
21 : public base::trace_event::ConvertableToTraceFormat { | |
22 public: | |
23 static std::unique_ptr<ConvertableToTraceFormat> AsTraceableDisplayItemList( | |
24 scoped_refptr<const DisplayItemList> list, | |
25 bool include_items) { | |
26 return std::unique_ptr<ConvertableToTraceFormat>( | |
27 new TracedDisplayItemList(list, include_items)); | |
28 } | |
29 void AppendAsTraceFormat(std::string* out) const override; | |
30 | |
31 private: | |
32 explicit TracedDisplayItemList(scoped_refptr<const DisplayItemList> list, | |
33 bool include_items); | |
34 ~TracedDisplayItemList() override; | |
35 | |
36 scoped_refptr<const DisplayItemList> display_item_list_; | |
37 bool include_items_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(TracedDisplayItemList); | |
40 }; | |
41 | |
42 } // namespace cc | |
43 | |
44 #endif // CC_DEBUG_TRACED_DISPLAY_ITEM_LIST_H_ | |
OLD | NEW |