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

Unified Diff: cc/trees/layer_tree_impl.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/trees/layer_tree_impl.h ('k') | cc/trees/proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index c054b783c196408aebbca92e74457579762d2b57..4b21b145123e06c2d5f308353f9a3ce6741d463b 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -8,7 +8,6 @@
#include <set>
#include "base/debug/trace_event.h"
-#include "base/debug/trace_event_argument.h"
#include "cc/animation/keyframed_animation_curve.h"
#include "cc/animation/scrollbar_animation_controller.h"
#include "cc/animation/scrollbar_animation_controller_linear_fade.h"
@@ -821,23 +820,26 @@
return layer_tree_host_impl_->animation_registrar();
}
-void LayerTreeImpl::AsValueInto(base::debug::TracedValue* state) const {
- TracedValue::MakeDictIntoImplicitSnapshot(state, "cc::LayerTreeImpl", this);
-
- state->BeginDictionary("root_layer");
- root_layer_->AsValueInto(state);
- state->EndDictionary();
-
- state->BeginArray("render_surface_layer_list");
+scoped_ptr<base::Value> LayerTreeImpl::AsValue() const {
+ scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
+ TracedValue::MakeDictIntoImplicitSnapshot(
+ state.get(), "cc::LayerTreeImpl", this);
+
+ state->Set("root_layer", root_layer_->AsValue().release());
+
+ scoped_ptr<base::ListValue> render_surface_layer_list(new base::ListValue());
typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
for (LayerIteratorType it = LayerIteratorType::Begin(
&render_surface_layer_list_); it != end; ++it) {
if (!it.represents_itself())
continue;
- TracedValue::AppendIDRef(*it, state);
- }
- state->EndArray();
+ render_surface_layer_list->Append(TracedValue::CreateIDRef(*it).release());
+ }
+
+ state->Set("render_surface_layer_list",
+ render_surface_layer_list.release());
+ return state.PassAs<base::Value>();
}
void LayerTreeImpl::SetRootLayerScrollOffsetDelegate(
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698