Index: cc/layers/picture_layer_impl.cc |
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
index 2544c0d78c8212af790d6679a18b48e7eec8122d..dcbcc7474a0d1ed0a0fb9aac6a1377e24d6c49b2 100644 |
--- a/cc/layers/picture_layer_impl.cc |
+++ b/cc/layers/picture_layer_impl.cc |
@@ -7,6 +7,7 @@ |
#include <algorithm> |
#include <limits> |
+#include "base/debug/trace_event_argument.h" |
#include "base/time/time.h" |
#include "cc/base/math_util.h" |
#include "cc/base/util.h" |
@@ -1335,31 +1336,42 @@ void PictureLayerImpl::GetDebugBorderProperties( |
*width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); |
} |
-void PictureLayerImpl::AsValueInto(base::DictionaryValue* state) const { |
+void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { |
const_cast<PictureLayerImpl*>(this)->DoPostCommitInitializationIfNeeded(); |
LayerImpl::AsValueInto(state); |
state->SetDouble("ideal_contents_scale", ideal_contents_scale_); |
state->SetDouble("geometry_contents_scale", MaximumTilingContentsScale()); |
- state->Set("tilings", tilings_->AsValue().release()); |
- state->Set("pictures", pile_->AsValue().release()); |
- state->Set("invalidation", invalidation_.AsValue().release()); |
+ state->BeginArray("tilings"); |
+ tilings_->AsValueInto(state); |
+ state->EndArray(); |
- scoped_ptr<base::ListValue> coverage_tiles(new base::ListValue); |
+ state->BeginArray("pictures"); |
+ pile_->AsValueInto(state); |
+ state->EndArray(); |
+ |
+ state->BeginArray("invalidation"); |
+ invalidation_.AsValueInto(state); |
+ state->EndArray(); |
+ |
+ state->BeginArray("coverage_tiles"); |
for (PictureLayerTilingSet::CoverageIterator iter(tilings_.get(), |
contents_scale_x(), |
gfx::Rect(content_bounds()), |
ideal_contents_scale_); |
iter; |
++iter) { |
- scoped_ptr<base::DictionaryValue> tile_data(new base::DictionaryValue); |
- tile_data->Set("geometry_rect", |
- MathUtil::AsValue(iter.geometry_rect()).release()); |
+ state->BeginDictionary(); |
+ |
+ state->BeginArray("geometry_rect"); |
+ MathUtil::AddToTracedValue(iter.geometry_rect(), state); |
+ state->EndArray(); |
+ |
if (*iter) |
- tile_data->Set("tile", TracedValue::CreateIDRef(*iter).release()); |
+ TracedValue::SetIDRef(*iter, state, "tile"); |
- coverage_tiles->Append(tile_data.release()); |
+ state->EndDictionary(); |
} |
- state->Set("coverage_tiles", coverage_tiles.release()); |
+ state->EndArray(); |
} |
size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |