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/gpu_raster_buffer_provider.h" | 5 #include "cc/raster/gpu_raster_buffer_provider.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 return resource_provider_->best_render_buffer_format(); | 219 return resource_provider_->best_render_buffer_format(); |
220 } | 220 } |
221 | 221 |
222 bool GpuRasterBufferProvider::IsResourceSwizzleRequired( | 222 bool GpuRasterBufferProvider::IsResourceSwizzleRequired( |
223 bool must_support_alpha) const { | 223 bool must_support_alpha) const { |
224 // This doesn't require a swizzle because we rasterize to the correct format. | 224 // This doesn't require a swizzle because we rasterize to the correct format. |
225 return false; | 225 return false; |
226 } | 226 } |
227 | 227 |
228 bool GpuRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { | 228 bool GpuRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { |
229 return true; | 229 return false; |
230 } | 230 } |
231 | 231 |
232 void GpuRasterBufferProvider::Shutdown() { | 232 void GpuRasterBufferProvider::Shutdown() { |
233 pending_raster_buffers_.clear(); | 233 pending_raster_buffers_.clear(); |
234 } | 234 } |
235 | 235 |
236 void GpuRasterBufferProvider::PlaybackOnWorkerThread( | 236 void GpuRasterBufferProvider::PlaybackOnWorkerThread( |
237 ResourceProvider::ScopedWriteLockGL* resource_lock, | 237 ResourceProvider::ScopedWriteLockGL* resource_lock, |
238 const gpu::SyncToken& sync_token, | 238 const gpu::SyncToken& sync_token, |
239 bool resource_has_previous_content, | 239 bool resource_has_previous_content, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 gl->OrderingBarrierCHROMIUM(); | 277 gl->OrderingBarrierCHROMIUM(); |
278 | 278 |
279 // Generate sync token after the barrier for cross context synchronization. | 279 // Generate sync token after the barrier for cross context synchronization. |
280 gpu::SyncToken resource_sync_token; | 280 gpu::SyncToken resource_sync_token; |
281 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); | 281 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); |
282 resource_lock->set_sync_token(resource_sync_token); | 282 resource_lock->set_sync_token(resource_sync_token); |
283 resource_lock->set_synchronized(!async_worker_context_enabled_); | 283 resource_lock->set_synchronized(!async_worker_context_enabled_); |
284 } | 284 } |
285 | 285 |
286 } // namespace cc | 286 } // namespace cc |
OLD | NEW |