| OLD | NEW |
| 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" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 | 13 |
| 13 TracedPicture::TracedPicture(scoped_refptr<const Picture> picture) | 14 TracedPicture::TracedPicture(scoped_refptr<const Picture> picture) |
| 14 : picture_(picture), is_alias_(false) {} | 15 : picture_(picture), is_alias_(false) {} |
| 15 | 16 |
| 16 TracedPicture::~TracedPicture() { | 17 TracedPicture::~TracedPicture() { |
| 17 } | 18 } |
| 18 | 19 |
| 19 scoped_refptr<base::debug::ConvertableToTraceFormat> | 20 scoped_refptr<base::debug::ConvertableToTraceFormat> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 49 } | 50 } |
| 50 | 51 |
| 51 void TracedPicture::AppendPicture(std::string* out) const { | 52 void TracedPicture::AppendPicture(std::string* out) const { |
| 52 scoped_ptr<base::Value> value = picture_->AsValue(); | 53 scoped_ptr<base::Value> value = picture_->AsValue(); |
| 53 std::string tmp; | 54 std::string tmp; |
| 54 base::JSONWriter::Write(value.get(), &tmp); | 55 base::JSONWriter::Write(value.get(), &tmp); |
| 55 out->append(tmp); | 56 out->append(tmp); |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace cc | 59 } // namespace cc |
| OLD | NEW |