Index: cc/layers/picture_layer_impl.cc |
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
index c22b082b9cada94e0e39487dc0cc45e580fd38f2..7bd66cd99235894398f168b0c394030a95ac0834 100644 |
--- a/cc/layers/picture_layer_impl.cc |
+++ b/cc/layers/picture_layer_impl.cc |
@@ -7,7 +7,6 @@ |
#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" |
@@ -1336,42 +1335,31 @@ |
*width = DebugColors::TiledContentLayerBorderWidth(layer_tree_impl()); |
} |
-void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const { |
+void PictureLayerImpl::AsValueInto(base::DictionaryValue* 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->BeginArray("tilings"); |
- tilings_->AsValueInto(state); |
- state->EndArray(); |
- |
- state->BeginArray("pictures"); |
- pile_->AsValueInto(state); |
- state->EndArray(); |
- |
- state->BeginArray("invalidation"); |
- invalidation_.AsValueInto(state); |
- state->EndArray(); |
- |
- state->BeginArray("coverage_tiles"); |
+ state->Set("tilings", tilings_->AsValue().release()); |
+ state->Set("pictures", pile_->AsValue().release()); |
+ state->Set("invalidation", invalidation_.AsValue().release()); |
+ |
+ scoped_ptr<base::ListValue> coverage_tiles(new base::ListValue); |
for (PictureLayerTilingSet::CoverageIterator iter(tilings_.get(), |
contents_scale_x(), |
gfx::Rect(content_bounds()), |
ideal_contents_scale_); |
iter; |
++iter) { |
- state->BeginDictionary(); |
- |
- state->BeginArray("geometry_rect"); |
- MathUtil::AddToTracedValue(iter.geometry_rect(), state); |
- state->EndArray(); |
- |
+ scoped_ptr<base::DictionaryValue> tile_data(new base::DictionaryValue); |
+ tile_data->Set("geometry_rect", |
+ MathUtil::AsValue(iter.geometry_rect()).release()); |
if (*iter) |
- TracedValue::SetIDRef(*iter, state, "tile"); |
- |
- state->EndDictionary(); |
- } |
- state->EndArray(); |
+ tile_data->Set("tile", TracedValue::CreateIDRef(*iter).release()); |
+ |
+ coverage_tiles->Append(tile_data.release()); |
+ } |
+ state->Set("coverage_tiles", coverage_tiles.release()); |
} |
size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { |