#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"
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() {
// Map/UnmapImageRasterBuffer provides direct access to the memory used by the
// GPU. Read lock fences are required to ensure that we're not trying to map a
// resource that is currently in-use by the GPU.
- resource_provider_->EnableReadLockFences(task->resource()->id(), true);
+ resource_provider_->EnableReadLockFences(task->resource()->id());
}
void ImageRasterWorkerPool::OnRasterFinished() {
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