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

Unified Diff: cc/resources/picture_layer_tiling.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/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 64661c1a6981eb87541742fd56e69ae43b691ffc..2809d70be41ea05b59040ba0aabf3f3334123adf 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -9,6 +9,7 @@
#include <limits>
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_argument.h"
#include "cc/base/math_util.h"
#include "cc/resources/tile.h"
#include "cc/resources/tile_priority.h"
@@ -658,12 +659,12 @@ void PictureLayerTiling::DidBecomeActive() {
}
}
-scoped_ptr<base::Value> PictureLayerTiling::AsValue() const {
- scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
+void PictureLayerTiling::AsValueInto(base::debug::TracedValue* state) const {
state->SetInteger("num_tiles", tiles_.size());
state->SetDouble("content_scale", contents_scale_);
- state->Set("tiling_size", MathUtil::AsValue(tiling_size()).release());
- return state.PassAs<base::Value>();
+ state->BeginDictionary("tiling_size");
+ MathUtil::AddToTracedValue(tiling_size(), state);
+ state->EndDictionary();
}
size_t PictureLayerTiling::GPUMemoryUsageInBytes() const {
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698