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

Unified Diff: cc/resources/tile.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/resources/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile.cc
diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc
index 2725a93623b46c2d6a7d2881ed92d5aee1068a3f..48a10db70ffc205520fc8a26b41060420bab30b8 100644
--- a/cc/resources/tile.cc
+++ b/cc/resources/tile.cc
@@ -6,7 +6,6 @@
#include <algorithm>
-#include "base/debug/trace_event_argument.h"
#include "cc/base/math_util.h"
#include "cc/debug/traced_value.h"
#include "cc/resources/tile_manager.h"
@@ -62,31 +61,20 @@
tile_manager_->DidChangeTilePriority(this);
}
-void Tile::AsValueInto(base::debug::TracedValue* res) const {
+scoped_ptr<base::Value> Tile::AsValue() const {
+ scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
TracedValue::MakeDictIntoImplicitSnapshotWithCategory(
- TRACE_DISABLED_BY_DEFAULT("cc.debug"), res, "cc::Tile", this);
- TracedValue::SetIDRef(picture_pile_.get(), res, "picture_pile");
+ TRACE_DISABLED_BY_DEFAULT("cc.debug"), res.get(), "cc::Tile", this);
+ res->Set("picture_pile",
+ TracedValue::CreateIDRef(picture_pile_.get()).release());
res->SetDouble("contents_scale", contents_scale_);
-
- res->BeginArray("content_rect");
- MathUtil::AddToTracedValue(content_rect_, res);
- res->EndArray();
-
+ res->Set("content_rect", MathUtil::AsValue(content_rect_).release());
res->SetInteger("layer_id", layer_id_);
-
- res->BeginDictionary("active_priority");
- priority_[ACTIVE_TREE].AsValueInto(res);
- res->EndDictionary();
-
- res->BeginDictionary("pending_priority");
- priority_[PENDING_TREE].AsValueInto(res);
- res->EndDictionary();
-
- res->BeginDictionary("managed_state");
- managed_state_.AsValueInto(res);
- res->EndDictionary();
-
+ res->Set("active_priority", priority_[ACTIVE_TREE].AsValue().release());
+ res->Set("pending_priority", priority_[PENDING_TREE].AsValue().release());
+ res->Set("managed_state", managed_state_.AsValue().release());
res->SetBoolean("use_picture_analysis", use_picture_analysis());
+ return res.PassAs<base::Value>();
}
size_t Tile::GPUMemoryUsageInBytes() const {
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698