| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/raster/gpu_tile_task_worker_pool.h" | 5 #include "cc/raster/gpu_tile_task_worker_pool.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 namespace_token_(task_graph_runner_->GetNamespaceToken()), | 113 namespace_token_(task_graph_runner_->GetNamespaceToken()), |
| 114 rasterizer_(new GpuRasterizer(context_provider, | 114 rasterizer_(new GpuRasterizer(context_provider, |
| 115 resource_provider, | 115 resource_provider, |
| 116 use_distance_field_text, | 116 use_distance_field_text, |
| 117 gpu_rasterization_msaa_sample_count)) {} | 117 gpu_rasterization_msaa_sample_count)) {} |
| 118 | 118 |
| 119 GpuTileTaskWorkerPool::~GpuTileTaskWorkerPool() { | 119 GpuTileTaskWorkerPool::~GpuTileTaskWorkerPool() { |
| 120 DCHECK_EQ(0u, completed_tasks_.size()); | 120 DCHECK_EQ(0u, completed_tasks_.size()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 TileTaskRunner* GpuTileTaskWorkerPool::AsTileTaskRunner() { | |
| 124 return this; | |
| 125 } | |
| 126 | |
| 127 void GpuTileTaskWorkerPool::Shutdown() { | 123 void GpuTileTaskWorkerPool::Shutdown() { |
| 128 TRACE_EVENT0("cc", "GpuTileTaskWorkerPool::Shutdown"); | 124 TRACE_EVENT0("cc", "GpuTileTaskWorkerPool::Shutdown"); |
| 129 | 125 |
| 130 TaskGraph empty; | 126 TaskGraph empty; |
| 131 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); | 127 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); |
| 132 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); | 128 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
| 133 } | 129 } |
| 134 | 130 |
| 135 void GpuTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) { | 131 void GpuTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) { |
| 136 TRACE_EVENT0("cc", "GpuTileTaskWorkerPool::ScheduleTasks"); | 132 TRACE_EVENT0("cc", "GpuTileTaskWorkerPool::ScheduleTasks"); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( | 185 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( |
| 190 rasterizer_.get(), resource, resource_content_id, previous_content_id)); | 186 rasterizer_.get(), resource, resource_content_id, previous_content_id)); |
| 191 } | 187 } |
| 192 | 188 |
| 193 void GpuTileTaskWorkerPool::ReleaseBufferForRaster( | 189 void GpuTileTaskWorkerPool::ReleaseBufferForRaster( |
| 194 std::unique_ptr<RasterBuffer> buffer) { | 190 std::unique_ptr<RasterBuffer> buffer) { |
| 195 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 191 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 196 } | 192 } |
| 197 | 193 |
| 198 } // namespace cc | 194 } // namespace cc |
| OLD | NEW |