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

Side by Side Diff: cc/debug/traced_value.cc

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 years, 11 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
« no previous file with comments | « cc/debug/traced_value.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #include "cc/debug/traced_value.h"
6
7 #include "base/strings/stringprintf.h"
8 #include "base/trace_event/trace_event_argument.h"
9
10 namespace cc {
11
12 void TracedValue::AppendIDRef(const void* id,
13 base::trace_event::TracedValue* state) {
14 state->BeginDictionary();
15 state->SetString("id_ref", base::StringPrintf("%p", id));
16 state->EndDictionary();
17 }
18
19 void TracedValue::SetIDRef(const void* id,
20 base::trace_event::TracedValue* state,
21 const char* name) {
22 state->BeginDictionary(name);
23 state->SetString("id_ref", base::StringPrintf("%p", id));
24 state->EndDictionary();
25 }
26
27 void TracedValue::MakeDictIntoImplicitSnapshot(
28 base::trace_event::TracedValue* dict,
29 const char* object_name,
30 const void* id) {
31 dict->SetString("id", base::StringPrintf("%s/%p", object_name, id));
32 }
33
34 void TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
35 const char* category,
36 base::trace_event::TracedValue* dict,
37 const char* object_name,
38 const void* id) {
39 dict->SetString("cat", category);
40 MakeDictIntoImplicitSnapshot(dict, object_name, id);
41 }
42
43 void TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
44 const char* category,
45 base::trace_event::TracedValue* dict,
46 const char* object_base_type_name,
47 const char* object_name,
48 const void* id) {
49 dict->SetString("cat", category);
50 dict->SetString("base_type", object_base_type_name);
51 MakeDictIntoImplicitSnapshot(dict, object_name, id);
52 }
53
54 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/traced_value.h ('k') | cc/output/begin_frame_args.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698