| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/resources/pixel_buffer_raster_worker_pool.h" | 5 #include "cc/resources/pixel_buffer_raster_worker_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/containers/stack_container.h" | 9 #include "base/containers/stack_container.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 TRACE_EVENT_ASYNC_STEP_INTO1( | 216 TRACE_EVENT_ASYNC_STEP_INTO1( |
| 217 "cc", | 217 "cc", |
| 218 "ScheduledTasks", | 218 "ScheduledTasks", |
| 219 this, | 219 this, |
| 220 StateName(), | 220 StateName(), |
| 221 "state", | 221 "state", |
| 222 TracedValue::FromValue(StateAsValue().release())); | 222 TracedValue::FromValue(StateAsValue().release())); |
| 223 } | 223 } |
| 224 | 224 |
| 225 unsigned PixelBufferRasterWorkerPool::GetResourceTarget() const { | |
| 226 return GL_TEXTURE_2D; | |
| 227 } | |
| 228 | |
| 229 ResourceFormat PixelBufferRasterWorkerPool::GetResourceFormat() const { | |
| 230 return resource_provider_->memory_efficient_texture_format(); | |
| 231 } | |
| 232 | |
| 233 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { | 225 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { |
| 234 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); | 226 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); |
| 235 | 227 |
| 236 CheckForCompletedRasterizerTasks(); | 228 CheckForCompletedRasterizerTasks(); |
| 237 CheckForCompletedUploads(); | 229 CheckForCompletedUploads(); |
| 238 FlushUploads(); | 230 FlushUploads(); |
| 239 | 231 |
| 240 for (internal::RasterizerTask::Vector::const_iterator it = | 232 for (internal::RasterizerTask::Vector::const_iterator it = |
| 241 completed_image_decode_tasks_.begin(); | 233 completed_image_decode_tasks_.begin(); |
| 242 it != completed_image_decode_tasks_.end(); | 234 it != completed_image_decode_tasks_.end(); |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 | 793 |
| 802 throttle_state->SetInteger("bytes_available_for_upload", | 794 throttle_state->SetInteger("bytes_available_for_upload", |
| 803 max_bytes_pending_upload_ - bytes_pending_upload_); | 795 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 804 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 796 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 805 throttle_state->SetInteger("scheduled_raster_task_count", | 797 throttle_state->SetInteger("scheduled_raster_task_count", |
| 806 scheduled_raster_task_count_); | 798 scheduled_raster_task_count_); |
| 807 return throttle_state.PassAs<base::Value>(); | 799 return throttle_state.PassAs<base::Value>(); |
| 808 } | 800 } |
| 809 | 801 |
| 810 } // namespace cc | 802 } // namespace cc |
| OLD | NEW |