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( |