Index: cc/trees/layer_tree_impl.cc |
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
index 4b21b145123e06c2d5f308353f9a3ce6741d463b..c054b783c196408aebbca92e74457579762d2b57 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -8,6 +8,7 @@ |
#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" |
@@ -820,26 +821,23 @@ AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { |
return layer_tree_host_impl_->animation_registrar(); |
} |
-scoped_ptr<base::Value> LayerTreeImpl::AsValue() const { |
- scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
- TracedValue::MakeDictIntoImplicitSnapshot( |
- state.get(), "cc::LayerTreeImpl", this); |
+void LayerTreeImpl::AsValueInto(base::debug::TracedValue* state) const { |
+ TracedValue::MakeDictIntoImplicitSnapshot(state, "cc::LayerTreeImpl", this); |
- state->Set("root_layer", root_layer_->AsValue().release()); |
+ state->BeginDictionary("root_layer"); |
+ root_layer_->AsValueInto(state); |
+ state->EndDictionary(); |
- scoped_ptr<base::ListValue> render_surface_layer_list(new base::ListValue()); |
+ state->BeginArray("render_surface_layer_list"); |
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; |
- render_surface_layer_list->Append(TracedValue::CreateIDRef(*it).release()); |
+ TracedValue::AppendIDRef(*it, state); |
} |
- |
- state->Set("render_surface_layer_list", |
- render_surface_layer_list.release()); |
- return state.PassAs<base::Value>(); |
+ state->EndArray(); |
} |
void LayerTreeImpl::SetRootLayerScrollOffsetDelegate( |