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

Unified Diff: cc/debug/traced_picture.cc

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « cc/debug/traced_picture.h ('k') | cc/debug/unittest_only_benchmark.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/traced_picture.cc
diff --git a/cc/debug/traced_picture.cc b/cc/debug/traced_picture.cc
deleted file mode 100644
index 2c7622b66d5fb98405437f58bb6d817fb66d0ca2..0000000000000000000000000000000000000000
--- a/cc/debug/traced_picture.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/debug/traced_picture.h"
-
-#include "base/json/json_writer.h"
-#include "base/strings/stringprintf.h"
-#include "base/values.h"
-
-namespace cc {
-
-TracedPicture::TracedPicture(scoped_refptr<const Picture> picture)
- : picture_(picture), is_alias_(false) {}
-
-TracedPicture::~TracedPicture() {
-}
-
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
-TracedPicture::AsTraceablePicture(const Picture* picture) {
- return scoped_refptr<base::trace_event::ConvertableToTraceFormat>(
- new TracedPicture(picture));
-}
-
-scoped_refptr<base::trace_event::ConvertableToTraceFormat>
-TracedPicture::AsTraceablePictureAlias(const Picture* original) {
- scoped_refptr<TracedPicture> ptr = new TracedPicture(original);
- ptr->is_alias_ = true;
- return scoped_refptr<base::trace_event::ConvertableToTraceFormat>(ptr);
-}
-
-void TracedPicture::AppendAsTraceFormat(std::string* out) const {
- if (is_alias_)
- AppendPictureAlias(out);
- else
- AppendPicture(out);
-}
-
-void TracedPicture::AppendPictureAlias(std::string* out) const {
- scoped_ptr<base::DictionaryValue> alias(new base::DictionaryValue());
- alias->SetString("id_ref", base::StringPrintf("%p", picture_.get()));
-
- scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
- res->Set("alias", alias.release());
-
- std::string tmp;
- base::JSONWriter::Write(res.get(), &tmp);
- out->append(tmp);
-}
-
-void TracedPicture::AppendPicture(std::string* out) const {
- scoped_ptr<base::Value> value = picture_->AsValue();
- std::string tmp;
- base::JSONWriter::Write(value.get(), &tmp);
- out->append(tmp);
-}
-
-} // namespace cc
« no previous file with comments | « cc/debug/traced_picture.h ('k') | cc/debug/unittest_only_benchmark.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698