| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // Only used as std::find_if predicate for DCHECKs. | 85 // Only used as std::find_if predicate for DCHECKs. |
| 86 bool WasCanceled(const internal::RasterWorkerPoolTask* task) { | 86 bool WasCanceled(const internal::RasterWorkerPoolTask* task) { |
| 87 return task->WasCanceled(); | 87 return task->WasCanceled(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace | 90 } // namespace |
| 91 | 91 |
| 92 PixelBufferRasterWorkerPool::PixelBufferRasterWorkerPool( | 92 PixelBufferRasterWorkerPool::PixelBufferRasterWorkerPool( |
| 93 ResourceProvider* resource_provider, | 93 ResourceProvider* resource_provider, |
| 94 size_t num_threads, | |
| 95 size_t max_transfer_buffer_usage_bytes) | 94 size_t max_transfer_buffer_usage_bytes) |
| 96 : RasterWorkerPool(resource_provider, num_threads), | 95 : RasterWorkerPool(resource_provider), |
| 97 shutdown_(false), | 96 shutdown_(false), |
| 98 scheduled_raster_task_count_(0), | 97 scheduled_raster_task_count_(0), |
| 99 bytes_pending_upload_(0), | 98 bytes_pending_upload_(0), |
| 100 max_bytes_pending_upload_(max_transfer_buffer_usage_bytes), | 99 max_bytes_pending_upload_(max_transfer_buffer_usage_bytes), |
| 101 has_performed_uploads_since_last_flush_(false), | 100 has_performed_uploads_since_last_flush_(false), |
| 102 check_for_completed_raster_tasks_pending_(false), | 101 check_for_completed_raster_tasks_pending_(false), |
| 103 should_notify_client_if_no_tasks_are_pending_(false), | 102 should_notify_client_if_no_tasks_are_pending_(false), |
| 104 should_notify_client_if_no_tasks_required_for_activation_are_pending_( | 103 should_notify_client_if_no_tasks_required_for_activation_are_pending_( |
| 105 false), | 104 false), |
| 106 raster_finished_task_pending_(false), | 105 raster_finished_task_pending_(false), |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 675 |
| 677 throttle_state->SetInteger("bytes_available_for_upload", | 676 throttle_state->SetInteger("bytes_available_for_upload", |
| 678 max_bytes_pending_upload_ - bytes_pending_upload_); | 677 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 679 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 678 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 680 throttle_state->SetInteger("scheduled_raster_task_count", | 679 throttle_state->SetInteger("scheduled_raster_task_count", |
| 681 scheduled_raster_task_count_); | 680 scheduled_raster_task_count_); |
| 682 return throttle_state.PassAs<base::Value>(); | 681 return throttle_state.PassAs<base::Value>(); |
| 683 } | 682 } |
| 684 | 683 |
| 685 } // namespace cc | 684 } // namespace cc |
| OLD | NEW |