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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN 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 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(
« 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