| 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/zero_copy_raster_worker_pool.h" | 5 #include "cc/resources/zero_copy_raster_worker_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 task->WillComplete(); | 170 task->WillComplete(); |
| 171 task->CompleteOnOriginThread(this); | 171 task->CompleteOnOriginThread(this); |
| 172 task->DidComplete(); | 172 task->DidComplete(); |
| 173 | 173 |
| 174 task->RunReplyOnOriginThread(); | 174 task->RunReplyOnOriginThread(); |
| 175 } | 175 } |
| 176 completed_tasks_.clear(); | 176 completed_tasks_.clear(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void ZeroCopyRasterWorkerPool::WaitForTasksToFinishRunning() { |
| 180 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
| 181 } |
| 182 |
| 179 scoped_ptr<RasterBuffer> ZeroCopyRasterWorkerPool::AcquireBufferForRaster( | 183 scoped_ptr<RasterBuffer> ZeroCopyRasterWorkerPool::AcquireBufferForRaster( |
| 180 const Resource* resource) { | 184 const Resource* resource) { |
| 181 return make_scoped_ptr<RasterBuffer>( | 185 return make_scoped_ptr<RasterBuffer>( |
| 182 new RasterBufferImpl(resource_provider_, resource)); | 186 new RasterBufferImpl(resource_provider_, resource)); |
| 183 } | 187 } |
| 184 | 188 |
| 185 void ZeroCopyRasterWorkerPool::ReleaseBufferForRaster( | 189 void ZeroCopyRasterWorkerPool::ReleaseBufferForRaster( |
| 186 scoped_ptr<RasterBuffer> buffer) { | 190 scoped_ptr<RasterBuffer> buffer) { |
| 187 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. | 191 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. |
| 188 } | 192 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 208 new base::debug::TracedValue(); | 212 new base::debug::TracedValue(); |
| 209 | 213 |
| 210 state->BeginArray("tasks_pending"); | 214 state->BeginArray("tasks_pending"); |
| 211 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 215 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
| 212 state->AppendBoolean(raster_pending_[task_set]); | 216 state->AppendBoolean(raster_pending_[task_set]); |
| 213 state->EndArray(); | 217 state->EndArray(); |
| 214 return state; | 218 return state; |
| 215 } | 219 } |
| 216 | 220 |
| 217 } // namespace cc | 221 } // namespace cc |
| OLD | NEW |