| 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/one_copy_tile_task_worker_pool.h" | 5 #include "cc/raster/one_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 #include <limits> | 10 #include <limits> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 bytes_scheduled_since_last_flush_(0), | 103 bytes_scheduled_since_last_flush_(0), |
| 104 preferred_tile_format_(preferred_tile_format) { | 104 preferred_tile_format_(preferred_tile_format) { |
| 105 staging_pool_ = StagingBufferPool::Create(task_runner, resource_provider, | 105 staging_pool_ = StagingBufferPool::Create(task_runner, resource_provider, |
| 106 use_partial_raster, | 106 use_partial_raster, |
| 107 max_staging_buffer_usage_in_bytes); | 107 max_staging_buffer_usage_in_bytes); |
| 108 } | 108 } |
| 109 | 109 |
| 110 OneCopyTileTaskWorkerPool::~OneCopyTileTaskWorkerPool() { | 110 OneCopyTileTaskWorkerPool::~OneCopyTileTaskWorkerPool() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 TileTaskRunner* OneCopyTileTaskWorkerPool::AsTileTaskRunner() { | |
| 114 return this; | |
| 115 } | |
| 116 | |
| 117 void OneCopyTileTaskWorkerPool::Shutdown() { | 113 void OneCopyTileTaskWorkerPool::Shutdown() { |
| 118 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::Shutdown"); | 114 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::Shutdown"); |
| 119 | 115 |
| 120 TaskGraph empty; | 116 TaskGraph empty; |
| 121 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); | 117 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); |
| 122 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); | 118 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
| 123 | 119 |
| 124 staging_pool_->Shutdown(); | 120 staging_pool_->Shutdown(); |
| 125 } | 121 } |
| 126 | 122 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 gl->OrderingBarrierCHROMIUM(); | 375 gl->OrderingBarrierCHROMIUM(); |
| 380 | 376 |
| 381 // Generate sync token after the barrier for cross context synchronization. | 377 // Generate sync token after the barrier for cross context synchronization. |
| 382 gpu::SyncToken sync_token; | 378 gpu::SyncToken sync_token; |
| 383 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); | 379 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); |
| 384 resource_lock->UpdateResourceSyncToken(sync_token); | 380 resource_lock->UpdateResourceSyncToken(sync_token); |
| 385 } | 381 } |
| 386 } | 382 } |
| 387 | 383 |
| 388 } // namespace cc | 384 } // namespace cc |
| OLD | NEW |