summaryrefslogtreecommitdiffstats
path: root/cc/layers
diff options
context:
space:
mode:
Diffstat (limited to 'cc/layers')
-rw-r--r--cc/layers/layer_impl.cc28
-rw-r--r--cc/layers/picture_layer_impl.cc13
-rw-r--r--cc/layers/tiled_layer_impl.cc4
3 files changed, 12 insertions, 33 deletions
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 8c7d972..d6e2a23 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1466,35 +1466,24 @@ void LayerImpl::AsValueInto(base::debug::TracedValue* state) const {
LayerTypeAsString(),
this);
state->SetInteger("layer_id", id());
- state->BeginDictionary("bounds");
- MathUtil::AddToTracedValue(bounds_, state);
- state->EndDictionary();
+ MathUtil::AddToTracedValue("bounds", bounds_, state);
state->SetDouble("opacity", opacity());
- state->BeginArray("position");
- MathUtil::AddToTracedValue(position_, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("position", position_, state);
state->SetInteger("draws_content", DrawsContent());
state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes());
- state->BeginArray("scroll_offset");
- MathUtil::AddToTracedValue(scroll_offset_, state);
- state->EndArray();
-
- state->BeginArray("transform_origin");
- MathUtil::AddToTracedValue(transform_origin_, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("scroll_offset", scroll_offset_, state);
+ MathUtil::AddToTracedValue("transform_origin", transform_origin_, state);
bool clipped;
gfx::QuadF layer_quad = MathUtil::MapQuad(
screen_space_transform(),
gfx::QuadF(gfx::Rect(content_bounds())),
&clipped);
- state->BeginArray("layer_quad");
- MathUtil::AddToTracedValue(layer_quad, state);
- state->EndArray();
+ MathUtil::AddToTracedValue("layer_quad", layer_quad, state);
if (!touch_event_handler_region_.IsEmpty()) {
state->BeginArray("touch_event_handler_region");
touch_event_handler_region_.AsValueInto(state);
@@ -1552,11 +1541,8 @@ void LayerImpl::AsValueInto(base::debug::TracedValue* state) const {
layer_animation_controller()->HasAnimationThatInflatesBounds());
gfx::BoxF box;
- if (LayerUtils::GetAnimationBounds(*this, &box)) {
- state->BeginArray("animation_bounds");
- MathUtil::AddToTracedValue(box, state);
- state->EndArray();
- }
+ if (LayerUtils::GetAnimationBounds(*this, &box))
+ MathUtil::AddToTracedValue("animation_bounds", box, state);
if (debug_info_.get()) {
std::string str;
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 8db30c6..6845a07 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1179,13 +1179,10 @@ void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
tilings_->AsValueInto(state);
state->EndArray();
- state->BeginArray("tile_priority_rect");
- MathUtil::AddToTracedValue(GetViewportForTilePriorityInContentSpace(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("tile_priority_rect",
+ GetViewportForTilePriorityInContentSpace(), state);
- state->BeginArray("visible_rect");
- MathUtil::AddToTracedValue(visible_content_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("visible_rect", visible_content_rect(), state);
state->BeginArray("pictures");
raster_source_->AsValueInto(state);
@@ -1202,9 +1199,7 @@ void PictureLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
iter; ++iter) {
state->BeginDictionary();
- state->BeginArray("geometry_rect");
- MathUtil::AddToTracedValue(iter.geometry_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("geometry_rect", iter.geometry_rect(), state);
if (*iter)
TracedValue::SetIDRef(*iter, state, "tile");
diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
index a36c030..5816fc5 100644
--- a/cc/layers/tiled_layer_impl.cc
+++ b/cc/layers/tiled_layer_impl.cc
@@ -107,9 +107,7 @@ scoped_ptr<LayerImpl> TiledLayerImpl::CreateLayerImpl(
void TiledLayerImpl::AsValueInto(base::debug::TracedValue* state) const {
LayerImpl::AsValueInto(state);
- state->BeginArray("invalidation");
- MathUtil::AddToTracedValue(update_rect(), state);
- state->EndArray();
+ MathUtil::AddToTracedValue("invalidation", update_rect(), state);
}
size_t TiledLayerImpl::GPUMemoryUsageInBytes() const {