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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 421183003: Revert of Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/layers/picture_layer_impl.h ('k') | cc/layers/surface_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/surface_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698