| 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/bitmap_tile_task_worker_pool.h" | 5 #include "cc/raster/bitmap_tile_task_worker_pool.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 TaskGraphRunner* task_graph_runner, | 80 TaskGraphRunner* task_graph_runner, |
| 81 ResourceProvider* resource_provider) | 81 ResourceProvider* resource_provider) |
| 82 : task_runner_(task_runner), | 82 : task_runner_(task_runner), |
| 83 task_graph_runner_(task_graph_runner), | 83 task_graph_runner_(task_graph_runner), |
| 84 namespace_token_(task_graph_runner->GetNamespaceToken()), | 84 namespace_token_(task_graph_runner->GetNamespaceToken()), |
| 85 resource_provider_(resource_provider) {} | 85 resource_provider_(resource_provider) {} |
| 86 | 86 |
| 87 BitmapTileTaskWorkerPool::~BitmapTileTaskWorkerPool() { | 87 BitmapTileTaskWorkerPool::~BitmapTileTaskWorkerPool() { |
| 88 } | 88 } |
| 89 | 89 |
| 90 TileTaskRunner* BitmapTileTaskWorkerPool::AsTileTaskRunner() { | |
| 91 return this; | |
| 92 } | |
| 93 | |
| 94 void BitmapTileTaskWorkerPool::Shutdown() { | 90 void BitmapTileTaskWorkerPool::Shutdown() { |
| 95 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::Shutdown"); | 91 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::Shutdown"); |
| 96 | 92 |
| 97 TaskGraph empty; | 93 TaskGraph empty; |
| 98 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); | 94 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); |
| 99 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); | 95 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
| 100 } | 96 } |
| 101 | 97 |
| 102 void BitmapTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) { | 98 void BitmapTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) { |
| 103 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::ScheduleTasks"); | 99 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::ScheduleTasks"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( | 139 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( |
| 144 resource_provider_, resource, resource_content_id, previous_content_id)); | 140 resource_provider_, resource, resource_content_id, previous_content_id)); |
| 145 } | 141 } |
| 146 | 142 |
| 147 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster( | 143 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster( |
| 148 std::unique_ptr<RasterBuffer> buffer) { | 144 std::unique_ptr<RasterBuffer> buffer) { |
| 149 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 145 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 150 } | 146 } |
| 151 | 147 |
| 152 } // namespace cc | 148 } // namespace cc |
| OLD | NEW |