| Index: cc/resources/pixel_buffer_raster_worker_pool.cc
|
| diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc
|
| index d7554736942a66ee541c065c99320385c42d0234..def15c411e5256e07fe8c84eced683c47590bee6 100644
|
| --- a/cc/resources/pixel_buffer_raster_worker_pool.cc
|
| +++ b/cc/resources/pixel_buffer_raster_worker_pool.cc
|
| @@ -8,7 +8,6 @@
|
|
|
| #include "base/containers/stack_container.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"
|
| #include "gpu/command_buffer/client/gles2_interface.h"
|
| @@ -223,7 +222,12 @@
|
| check_for_completed_raster_task_notifier_.Schedule();
|
|
|
| TRACE_EVENT_ASYNC_STEP_INTO1(
|
| - "cc", "ScheduledTasks", this, StateName(), "state", StateAsValue());
|
| + "cc",
|
| + "ScheduledTasks",
|
| + this,
|
| + StateName(),
|
| + "state",
|
| + TracedValue::FromValue(StateAsValue().release()));
|
| }
|
|
|
| void PixelBufferRasterWorkerPool::CheckForCompletedTasks() {
|
| @@ -456,7 +460,12 @@
|
| ScheduleMoreTasks();
|
|
|
| TRACE_EVENT_ASYNC_STEP_INTO1(
|
| - "cc", "ScheduledTasks", this, StateName(), "state", StateAsValue());
|
| + "cc",
|
| + "ScheduledTasks",
|
| + this,
|
| + StateName(),
|
| + "state",
|
| + TracedValue::FromValue(StateAsValue().release()));
|
|
|
| // Schedule another check for completed raster tasks while there are
|
| // pending raster tasks or pending uploads.
|
| @@ -733,29 +742,29 @@
|
| completed_tasks_.clear();
|
| }
|
|
|
| -scoped_refptr<base::debug::ConvertableToTraceFormat>
|
| -PixelBufferRasterWorkerPool::StateAsValue() const {
|
| - scoped_refptr<base::debug::TracedValue> state =
|
| - new base::debug::TracedValue();
|
| +scoped_ptr<base::Value> PixelBufferRasterWorkerPool::StateAsValue() const {
|
| + scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue);
|
| +
|
| state->SetInteger("completed_count", completed_raster_tasks_.size());
|
| state->SetInteger("pending_count", raster_task_states_.size());
|
| state->SetInteger("pending_upload_count",
|
| raster_tasks_with_pending_upload_.size());
|
| state->SetInteger("pending_required_for_activation_count",
|
| raster_tasks_required_for_activation_count_);
|
| - state->BeginDictionary("throttle_state");
|
| - ThrottleStateAsValueInto(state.get());
|
| - state->EndDictionary();
|
| - return state;
|
| -}
|
| -
|
| -void PixelBufferRasterWorkerPool::ThrottleStateAsValueInto(
|
| - base::debug::TracedValue* throttle_state) const {
|
| + state->Set("throttle_state", ThrottleStateAsValue().release());
|
| + return state.PassAs<base::Value>();
|
| +}
|
| +
|
| +scoped_ptr<base::Value> PixelBufferRasterWorkerPool::ThrottleStateAsValue()
|
| + const {
|
| + scoped_ptr<base::DictionaryValue> throttle_state(new base::DictionaryValue);
|
| +
|
| throttle_state->SetInteger("bytes_available_for_upload",
|
| max_bytes_pending_upload_ - bytes_pending_upload_);
|
| throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_);
|
| throttle_state->SetInteger("scheduled_raster_task_count",
|
| scheduled_raster_task_count_);
|
| + return throttle_state.PassAs<base::Value>();
|
| }
|
|
|
| } // namespace cc
|
|
|