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

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

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/debug/rendering_stats_unittest.cc ('k') | cc/debug/traced_value.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/debug/traced_picture.h" 5 #include "cc/debug/traced_picture.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/debug/traced_value.h"
11 10
12 namespace cc { 11 namespace cc {
13 12
14 TracedPicture::TracedPicture(scoped_refptr<const Picture> picture) 13 TracedPicture::TracedPicture(scoped_refptr<const Picture> picture)
15 : picture_(picture), is_alias_(false) {} 14 : picture_(picture), is_alias_(false) {}
16 15
17 TracedPicture::~TracedPicture() { 16 TracedPicture::~TracedPicture() {
18 } 17 }
19 18
20 scoped_refptr<base::debug::ConvertableToTraceFormat> 19 scoped_refptr<base::debug::ConvertableToTraceFormat>
(...skipping 29 matching lines...) Expand all
50 } 49 }
51 50
52 void TracedPicture::AppendPicture(std::string* out) const { 51 void TracedPicture::AppendPicture(std::string* out) const {
53 scoped_ptr<base::Value> value = picture_->AsValue(); 52 scoped_ptr<base::Value> value = picture_->AsValue();
54 std::string tmp; 53 std::string tmp;
55 base::JSONWriter::Write(value.get(), &tmp); 54 base::JSONWriter::Write(value.get(), &tmp);
56 out->append(tmp); 55 out->append(tmp);
57 } 56 }
58 57
59 } // namespace cc 58 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rendering_stats_unittest.cc ('k') | cc/debug/traced_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698