Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: cc/debug/layer_debug_info.h

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Petrcermak + oysteine review + LayerDebugInfo refptr wrapper Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698