diff options
author | jungjik.lee <jungjik.lee@samsung.com> | 2015-01-21 06:06:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-21 14:08:11 +0000 |
commit | 50f9c8e35e788b657d3b3cd825ece454a13ffc63 (patch) | |
tree | 1cb56f3eb3058606f02b24b690d4ae2a59008ab7 /cc/resources | |
parent | d8c057d71ae5062bb68b4fefae30ddf7180d5ea7 (diff) | |
download | chromium_src-50f9c8e35e788b657d3b3cd825ece454a13ffc63.zip chromium_src-50f9c8e35e788b657d3b3cd825ece454a13ffc63.tar.gz chromium_src-50f9c8e35e788b657d3b3cd825ece454a13ffc63.tar.bz2 |
cc: refactor of MathUtil::AddToTracedValue
Pass the name to MathUtilAddToTracedValue
and decide the json value type internally.
so that we could add the value without knowing
the value type.
Review URL: https://codereview.chromium.org/853393002
Cr-Commit-Position: refs/heads/master@{#312339}
Diffstat (limited to 'cc/resources')
-rw-r--r-- | cc/resources/picture.cc | 4 | ||||
-rw-r--r-- | cc/resources/picture_layer_tiling.cc | 4 | ||||
-rw-r--r-- | cc/resources/tile.cc | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc index d878ce3..b1ca99d 100644 --- a/cc/resources/picture.cc +++ b/cc/resources/picture.cc @@ -470,9 +470,7 @@ scoped_refptr<base::debug::ConvertableToTraceFormat> scoped_refptr<base::debug::TracedValue> record_data = new base::debug::TracedValue(); TracedValue::SetIDRef(this, record_data.get(), "picture_id"); - record_data->BeginArray("layer_rect"); - MathUtil::AddToTracedValue(layer_rect_, record_data.get()); - record_data->EndArray(); + MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get()); return record_data; } diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc index 341e6e3..aab740a 100644 --- a/cc/resources/picture_layer_tiling.cc +++ b/cc/resources/picture_layer_tiling.cc @@ -869,9 +869,7 @@ void PictureLayerTiling::GetAllTilesForTracing( void PictureLayerTiling::AsValueInto(base::debug::TracedValue* state) const { state->SetInteger("num_tiles", tiles_.size()); state->SetDouble("content_scale", contents_scale_); - state->BeginDictionary("tiling_size"); - MathUtil::AddToTracedValue(tiling_size(), state); - state->EndDictionary(); + MathUtil::AddToTracedValue("tiling_size", tiling_size(), state); } size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc index 8a09cfc..6734bab 100644 --- a/cc/resources/tile.cc +++ b/cc/resources/tile.cc @@ -55,9 +55,7 @@ void Tile::AsValueInto(base::debug::TracedValue* res) const { TracedValue::SetIDRef(raster_source_.get(), res, "picture_pile"); res->SetDouble("contents_scale", contents_scale_); - res->BeginArray("content_rect"); - MathUtil::AddToTracedValue(content_rect_, res); - res->EndArray(); + MathUtil::AddToTracedValue("content_rect", content_rect_, res); res->SetInteger("layer_id", layer_id_); |