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_raster_buffer_provider.h" | 5 #include "cc/raster/one_copy_raster_buffer_provider.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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 | 147 |
148 return resource_provider_->best_texture_format(); | 148 return resource_provider_->best_texture_format(); |
149 } | 149 } |
150 | 150 |
151 bool OneCopyRasterBufferProvider::IsResourceSwizzleRequired( | 151 bool OneCopyRasterBufferProvider::IsResourceSwizzleRequired( |
152 bool must_support_alpha) const { | 152 bool must_support_alpha) const { |
153 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); | 153 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); |
154 } | 154 } |
155 | 155 |
156 bool OneCopyRasterBufferProvider::IsPartialRasterSupported() const { | 156 bool OneCopyRasterBufferProvider::IsPartialRasterSupported() const { |
157 return true; | 157 return false; |
ericrk
2016/07/11 18:55:29
One copy doesn't support partial raster into a buf
enne (OOO)
2016/07/11 21:16:24
I'm not sure I know what the best answer is, but I
ericrk
2016/07/12 17:31:56
Renamed this function to hopefully be clearer.
| |
158 } | 158 } |
159 | 159 |
160 void OneCopyRasterBufferProvider::Shutdown() { | 160 void OneCopyRasterBufferProvider::Shutdown() { |
161 staging_pool_.Shutdown(); | 161 staging_pool_.Shutdown(); |
162 pending_raster_buffers_.clear(); | 162 pending_raster_buffers_.clear(); |
163 } | 163 } |
164 | 164 |
165 void OneCopyRasterBufferProvider::PlaybackAndCopyOnWorkerThread( | 165 void OneCopyRasterBufferProvider::PlaybackAndCopyOnWorkerThread( |
166 const Resource* resource, | 166 const Resource* resource, |
167 ResourceProvider::ScopedWriteLockGL* resource_lock, | 167 ResourceProvider::ScopedWriteLockGL* resource_lock, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
374 gl->OrderingBarrierCHROMIUM(); | 374 gl->OrderingBarrierCHROMIUM(); |
375 | 375 |
376 // Generate sync token after the barrier for cross context synchronization. | 376 // Generate sync token after the barrier for cross context synchronization. |
377 gpu::SyncToken resource_sync_token; | 377 gpu::SyncToken resource_sync_token; |
378 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); | 378 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); |
379 resource_lock->set_sync_token(resource_sync_token); | 379 resource_lock->set_sync_token(resource_sync_token); |
380 resource_lock->set_synchronized(!async_worker_context_enabled_); | 380 resource_lock->set_synchronized(!async_worker_context_enabled_); |
381 } | 381 } |
382 | 382 |
383 } // namespace cc | 383 } // namespace cc |
OLD | NEW |