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

Unified Diff: cc/resources/image_raster_worker_pool.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN 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/resources/image_raster_worker_pool.h ('k') | cc/resources/managed_tile_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/image_raster_worker_pool.cc
diff --git a/cc/resources/image_raster_worker_pool.cc b/cc/resources/image_raster_worker_pool.cc
index 79cfe37e9468028550e4158ef42ff0dc41964d6b..8ac59d306ed332b48fee6649a68673395d2dbcaa 100644
--- a/cc/resources/image_raster_worker_pool.cc
+++ b/cc/resources/image_raster_worker_pool.cc
@@ -5,6 +5,7 @@
#include "cc/resources/image_raster_worker_pool.h"
#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_argument.h"
#include "cc/debug/traced_value.h"
#include "cc/resources/resource.h"
@@ -118,12 +119,7 @@ void ImageRasterWorkerPool::ScheduleTasks(RasterTaskQueue* queue) {
new_raster_required_for_activation_finished_task;
TRACE_EVENT_ASYNC_STEP_INTO1(
- "cc",
- "ScheduledTasks",
- this,
- "rasterizing",
- "state",
- TracedValue::FromValue(StateAsValue().release()));
+ "cc", "ScheduledTasks", this, "rasterizing", "state", StateAsValue());
}
void ImageRasterWorkerPool::CheckForCompletedTasks() {
@@ -174,21 +170,18 @@ void ImageRasterWorkerPool::OnRasterRequiredForActivationFinished() {
DCHECK(raster_tasks_required_for_activation_pending_);
raster_tasks_required_for_activation_pending_ = false;
TRACE_EVENT_ASYNC_STEP_INTO1(
- "cc",
- "ScheduledTasks",
- this,
- "rasterizing",
- "state",
- TracedValue::FromValue(StateAsValue().release()));
+ "cc", "ScheduledTasks", this, "rasterizing", "state", StateAsValue());
client_->DidFinishRunningTasksRequiredForActivation();
}
-scoped_ptr<base::Value> ImageRasterWorkerPool::StateAsValue() const {
- scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
+scoped_refptr<base::debug::ConvertableToTraceFormat>
+ImageRasterWorkerPool::StateAsValue() const {
+ scoped_refptr<base::debug::TracedValue> state =
+ new base::debug::TracedValue();
state->SetBoolean("tasks_required_for_activation_pending",
raster_tasks_required_for_activation_pending_);
- return state.PassAs<base::Value>();
+ return state;
}
} // namespace cc
« no previous file with comments | « cc/resources/image_raster_worker_pool.h ('k') | cc/resources/managed_tile_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698