| 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 "base/containers/stack_container.h" | 7 #include "base/containers/stack_container.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "cc/debug/traced_value.h" | 10 #include "cc/debug/traced_value.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // another check. | 210 // another check. |
| 211 check_for_completed_raster_tasks_callback_.Cancel(); | 211 check_for_completed_raster_tasks_callback_.Cancel(); |
| 212 check_for_completed_raster_tasks_pending_ = false; | 212 check_for_completed_raster_tasks_pending_ = false; |
| 213 ScheduleCheckForCompletedRasterTasks(); | 213 ScheduleCheckForCompletedRasterTasks(); |
| 214 | 214 |
| 215 TRACE_EVENT_ASYNC_STEP_INTO1( | 215 TRACE_EVENT_ASYNC_STEP_INTO1( |
| 216 "cc", "ScheduledTasks", this, StateName(), | 216 "cc", "ScheduledTasks", this, StateName(), |
| 217 "state", TracedValue::FromValue(StateAsValue().release())); | 217 "state", TracedValue::FromValue(StateAsValue().release())); |
| 218 } | 218 } |
| 219 | 219 |
| 220 GLenum PixelBufferRasterWorkerPool::GetResourceTarget() const { |
| 221 return GL_TEXTURE_2D; |
| 222 } |
| 223 |
| 220 ResourceFormat PixelBufferRasterWorkerPool::GetResourceFormat() const { | 224 ResourceFormat PixelBufferRasterWorkerPool::GetResourceFormat() const { |
| 221 return resource_provider()->memory_efficient_texture_format(); | 225 return resource_provider()->memory_efficient_texture_format(); |
| 222 } | 226 } |
| 223 | 227 |
| 224 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { | 228 void PixelBufferRasterWorkerPool::CheckForCompletedTasks() { |
| 225 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); | 229 TRACE_EVENT0("cc", "PixelBufferRasterWorkerPool::CheckForCompletedTasks"); |
| 226 | 230 |
| 227 RasterWorkerPool::CheckForCompletedTasks(); | 231 RasterWorkerPool::CheckForCompletedTasks(); |
| 228 CheckForCompletedUploads(); | 232 CheckForCompletedUploads(); |
| 229 FlushUploads(); | 233 FlushUploads(); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 668 |
| 665 throttle_state->SetInteger("bytes_available_for_upload", | 669 throttle_state->SetInteger("bytes_available_for_upload", |
| 666 max_bytes_pending_upload_ - bytes_pending_upload_); | 670 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 667 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 671 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 668 throttle_state->SetInteger("scheduled_raster_task_count", | 672 throttle_state->SetInteger("scheduled_raster_task_count", |
| 669 scheduled_raster_task_count_); | 673 scheduled_raster_task_count_); |
| 670 return throttle_state.PassAs<base::Value>(); | 674 return throttle_state.PassAs<base::Value>(); |
| 671 } | 675 } |
| 672 | 676 |
| 673 } // namespace cc | 677 } // namespace cc |
| OLD | NEW |