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

Unified Diff: cc/debug/traced_value.h

Issue 270703004: Making BeginFrameArgs work with TRACE_EVENT system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing another include. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/output/begin_frame_args.h » ('j') | cc/output/begin_frame_args.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/traced_value.h
diff --git a/cc/debug/traced_value.h b/cc/debug/traced_value.h
index e96c09a58963eb69cbcff4c51d6df61fe572c4c1..c70e919f68f3aebe5ed6d089f6b651a1df460f61 100644
--- a/cc/debug/traced_value.h
+++ b/cc/debug/traced_value.h
@@ -46,6 +46,17 @@ class TracedValue : public base::debug::ConvertableToTraceFormat {
DISALLOW_COPY_AND_ASSIGN(TracedValue);
};
+template <class T>
+static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(T* t) {
brianderson 2014/05/08 21:25:49 Nice!
+ return TracedValue::FromValue(t->StateAsValue().release());
+}
+
+template <class T>
+static scoped_refptr<base::debug::ConvertableToTraceFormat> ToTrace(
+ const T& t) {
+ return ToTrace(&t);
+}
+
} // namespace cc
#endif // CC_DEBUG_TRACED_VALUE_H_
« no previous file with comments | « no previous file | cc/output/begin_frame_args.h » ('j') | cc/output/begin_frame_args.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698