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

Unified Diff: cc/debug/frame_viewer_instrumentation.h

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/base/region.cc ('k') | cc/debug/rendering_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/frame_viewer_instrumentation.h
diff --git a/cc/debug/frame_viewer_instrumentation.h b/cc/debug/frame_viewer_instrumentation.h
index 7d97b52e0059216c26e0c9126c80886729ff479e..16cf4335ac2bb20f6fcbbbd8183aa6b4fd29142a 100644
--- a/cc/debug/frame_viewer_instrumentation.h
+++ b/cc/debug/frame_viewer_instrumentation.h
@@ -23,18 +23,17 @@
const char kAnalyzeTask[] = "AnalyzeTask";
const char kRasterTask[] = "RasterTask";
-scoped_refptr<base::debug::ConvertableToTraceFormat> TileDataAsValue(
- const void* tile_id,
- TileResolution tile_resolution,
- int source_frame_number,
- int layer_id) {
- scoped_refptr<base::debug::TracedValue> res(new base::debug::TracedValue());
- TracedValue::SetIDRef(tile_id, res, internal::kTileId);
- res->SetString(internal::kTileResolution,
- TileResolutionToString(tile_resolution));
+scoped_ptr<base::Value> TileDataAsValue(const void* tile_id,
+ TileResolution tile_resolution,
+ int source_frame_number,
+ int layer_id) {
+ scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue);
+ res->Set(internal::kTileId, TracedValue::CreateIDRef(tile_id).release());
+ res->Set(internal::kTileResolution,
+ TileResolutionAsValue(tile_resolution).release());
res->SetInteger(internal::kSourceFrameNumber, source_frame_number);
res->SetInteger(internal::kLayerId, layer_id);
- return res;
+ return res.PassAs<base::Value>();
}
} // namespace internal
@@ -49,8 +48,10 @@
internal::kCategory,
internal::kAnalyzeTask,
internal::kTileData,
- internal::TileDataAsValue(
- tile_id, tile_resolution, source_frame_number, layer_id));
+ TracedValue::FromValue(internal::TileDataAsValue(tile_id,
+ tile_resolution,
+ source_frame_number,
+ layer_id).release()));
}
~ScopedAnalyzeTask() {
TRACE_EVENT_END0(internal::kCategory, internal::kAnalyzeTask);
@@ -71,10 +72,12 @@
internal::kCategory,
internal::kRasterTask,
internal::kTileData,
- internal::TileDataAsValue(
- tile_id, tile_resolution, source_frame_number, layer_id),
+ TracedValue::FromValue(internal::TileDataAsValue(tile_id,
+ tile_resolution,
+ source_frame_number,
+ layer_id).release()),
internal::kRasterMode,
- RasterModeToString(raster_mode));
+ TracedValue::FromValue(RasterModeAsValue(raster_mode).release()));
}
~ScopedRasterTask() {
TRACE_EVENT_END0(internal::kCategory, internal::kRasterTask);
« no previous file with comments | « cc/base/region.cc ('k') | cc/debug/rendering_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698