| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 ScheduleTasksOnOriginThread(this, graph); | 104 ScheduleTasksOnOriginThread(this, graph); |
| 105 task_graph_runner_->ScheduleTasks(namespace_token_, graph); | 105 task_graph_runner_->ScheduleTasks(namespace_token_, graph); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void BitmapTileTaskWorkerPool::CheckForCompletedTasks() { | 108 void BitmapTileTaskWorkerPool::CheckForCompletedTasks() { |
| 109 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::CheckForCompletedTasks"); | 109 TRACE_EVENT0("cc", "BitmapTileTaskWorkerPool::CheckForCompletedTasks"); |
| 110 | 110 |
| 111 task_graph_runner_->CollectCompletedTasks(namespace_token_, | 111 task_graph_runner_->CollectCompletedTasks(namespace_token_, |
| 112 &completed_tasks_); | 112 &completed_tasks_); |
| 113 for (Task::Vector::const_iterator it = completed_tasks_.begin(); | 113 for (DependencyTask::Vector::const_iterator it = completed_tasks_.begin(); |
| 114 it != completed_tasks_.end(); ++it) { | 114 it != completed_tasks_.end(); ++it) { |
| 115 TileTask* task = static_cast<TileTask*>(it->get()); | 115 DependencyTask* task = static_cast<DependencyTask*>(it->get()); |
| 116 | 116 |
| 117 task->WillComplete(); | 117 task->WillComplete(); |
| 118 task->CompleteOnOriginThread(this); | 118 task->CompleteOnOriginThread(this); |
| 119 task->DidComplete(); | 119 task->DidComplete(); |
| 120 } | 120 } |
| 121 completed_tasks_.clear(); | 121 completed_tasks_.clear(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 ResourceFormat BitmapTileTaskWorkerPool::GetResourceFormat( | 124 ResourceFormat BitmapTileTaskWorkerPool::GetResourceFormat( |
| 125 bool must_support_alpha) const { | 125 bool must_support_alpha) const { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 138 return scoped_ptr<RasterBuffer>(new RasterBufferImpl( | 138 return scoped_ptr<RasterBuffer>(new RasterBufferImpl( |
| 139 resource_provider_, resource, resource_content_id, previous_content_id)); | 139 resource_provider_, resource, resource_content_id, previous_content_id)); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster( | 142 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster( |
| 143 scoped_ptr<RasterBuffer> buffer) { | 143 scoped_ptr<RasterBuffer> buffer) { |
| 144 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 144 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace cc | 147 } // namespace cc |
| OLD | NEW |