| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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_LAYER_DEBUG_INFO_H_ |
| 6 #define CC_DEBUG_LAYER_DEBUG_INFO_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 |
| 11 namespace base { |
| 12 namespace trace_event { |
| 13 class ConvertableToTraceFormat; |
| 14 } |
| 15 } |
| 16 |
| 17 namespace cc { |
| 18 |
| 19 // A wrapper around ConvertableToTraceFormat which allows shared (refcounted) |
| 20 // memory ownership of the Layer's DebugInfo. |
| 21 class LayerDebugInfo : public base::RefCounted<LayerDebugInfo> { |
| 22 public: |
| 23 explicit LayerDebugInfo( |
| 24 scoped_ptr<base::trace_event::ConvertableToTraceFormat> raw); |
| 25 |
| 26 void AppendAsTraceFormat(std::string* out) const; |
| 27 |
| 28 private: |
| 29 friend class base::RefCounted<LayerDebugInfo>; |
| 30 virtual ~LayerDebugInfo(); |
| 31 |
| 32 scoped_ptr<base::trace_event::ConvertableToTraceFormat> raw_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(LayerDebugInfo); |
| 35 }; |
| 36 |
| 37 } // namespace cc |
| 38 |
| 39 #endif // CC_DEBUG_LAYER_DEBUG_INFO_H_ |
| OLD | NEW |