| 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/raster/zero_copy_tile_task_worker_pool.h" | 5 #include "cc/raster/zero_copy_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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 ScheduleTasksOnOriginThread(this, graph); | 106 ScheduleTasksOnOriginThread(this, graph); |
| 107 task_graph_runner_->ScheduleTasks(namespace_token_, graph); | 107 task_graph_runner_->ScheduleTasks(namespace_token_, graph); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void ZeroCopyTileTaskWorkerPool::CheckForCompletedTasks() { | 110 void ZeroCopyTileTaskWorkerPool::CheckForCompletedTasks() { |
| 111 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::CheckForCompletedTasks"); | 111 TRACE_EVENT0("cc", "ZeroCopyTileTaskWorkerPool::CheckForCompletedTasks"); |
| 112 | 112 |
| 113 task_graph_runner_->CollectCompletedTasks(namespace_token_, | 113 task_graph_runner_->CollectCompletedTasks(namespace_token_, |
| 114 &completed_tasks_); | 114 &completed_tasks_); |
| 115 for (Task::Vector::const_iterator it = completed_tasks_.begin(); | 115 for (DependencyTask::Vector::const_iterator it = completed_tasks_.begin(); |
| 116 it != completed_tasks_.end(); ++it) { | 116 it != completed_tasks_.end(); ++it) { |
| 117 TileTask* task = static_cast<TileTask*>(it->get()); | 117 DependencyTask* task = static_cast<DependencyTask*>(it->get()); |
| 118 | 118 |
| 119 task->WillComplete(); | 119 task->WillComplete(); |
| 120 task->CompleteOnOriginThread(this); | 120 task->CompleteOnOriginThread(this); |
| 121 task->DidComplete(); | 121 task->DidComplete(); |
| 122 } | 122 } |
| 123 completed_tasks_.clear(); | 123 completed_tasks_.clear(); |
| 124 } | 124 } |
| 125 | 125 |
| 126 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat( | 126 ResourceFormat ZeroCopyTileTaskWorkerPool::GetResourceFormat( |
| 127 bool must_support_alpha) const { | 127 bool must_support_alpha) const { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 146 return make_scoped_ptr<RasterBuffer>( | 146 return make_scoped_ptr<RasterBuffer>( |
| 147 new RasterBufferImpl(resource_provider_, resource)); | 147 new RasterBufferImpl(resource_provider_, resource)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster( | 150 void ZeroCopyTileTaskWorkerPool::ReleaseBufferForRaster( |
| 151 scoped_ptr<RasterBuffer> buffer) { | 151 scoped_ptr<RasterBuffer> buffer) { |
| 152 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 152 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace cc | 155 } // namespace cc |
| OLD | NEW |