| 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_tile_task_worker_pool.h" | 5 #include "cc/resources/pixel_buffer_tile_task_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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 DCHECK_EQ(0u, raster_tasks_with_pending_upload_.size()); | 140 DCHECK_EQ(0u, raster_tasks_with_pending_upload_.size()); |
| 141 DCHECK_EQ(0u, completed_raster_tasks_.size()); | 141 DCHECK_EQ(0u, completed_raster_tasks_.size()); |
| 142 DCHECK_EQ(0u, completed_image_decode_tasks_.size()); | 142 DCHECK_EQ(0u, completed_image_decode_tasks_.size()); |
| 143 DCHECK(NonEmptyTaskSetsFromTaskCounts(task_counts_).none()); | 143 DCHECK(NonEmptyTaskSetsFromTaskCounts(task_counts_).none()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 TileTaskRunner* PixelBufferTileTaskWorkerPool::AsTileTaskRunner() { | 146 TileTaskRunner* PixelBufferTileTaskWorkerPool::AsTileTaskRunner() { |
| 147 return this; | 147 return this; |
| 148 } | 148 } |
| 149 | 149 |
| 150 ResourceFormat PixelBufferTileTaskWorkerPool::GetResourceFormat() { |
| 151 return resource_provider_->memory_efficient_texture_format(); |
| 152 } |
| 153 |
| 150 void PixelBufferTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) { | 154 void PixelBufferTileTaskWorkerPool::SetClient(TileTaskRunnerClient* client) { |
| 151 client_ = client; | 155 client_ = client; |
| 152 } | 156 } |
| 153 | 157 |
| 154 void PixelBufferTileTaskWorkerPool::Shutdown() { | 158 void PixelBufferTileTaskWorkerPool::Shutdown() { |
| 155 TRACE_EVENT0("cc", "PixelBufferTileTaskWorkerPool::Shutdown"); | 159 TRACE_EVENT0("cc", "PixelBufferTileTaskWorkerPool::Shutdown"); |
| 156 | 160 |
| 157 shutdown_ = true; | 161 shutdown_ = true; |
| 158 | 162 |
| 159 TaskGraph empty; | 163 TaskGraph empty; |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 void PixelBufferTileTaskWorkerPool::ThrottleStateAsValueInto( | 721 void PixelBufferTileTaskWorkerPool::ThrottleStateAsValueInto( |
| 718 base::debug::TracedValue* throttle_state) const { | 722 base::debug::TracedValue* throttle_state) const { |
| 719 throttle_state->SetInteger("bytes_available_for_upload", | 723 throttle_state->SetInteger("bytes_available_for_upload", |
| 720 max_bytes_pending_upload_ - bytes_pending_upload_); | 724 max_bytes_pending_upload_ - bytes_pending_upload_); |
| 721 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); | 725 throttle_state->SetInteger("bytes_pending_upload", bytes_pending_upload_); |
| 722 throttle_state->SetInteger("scheduled_raster_task_count", | 726 throttle_state->SetInteger("scheduled_raster_task_count", |
| 723 scheduled_raster_task_count_); | 727 scheduled_raster_task_count_); |
| 724 } | 728 } |
| 725 | 729 |
| 726 } // namespace cc | 730 } // namespace cc |
| OLD | NEW |