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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 bool must_support_alpha) const { | 187 bool must_support_alpha) const { |
188 return resource_provider_->best_render_buffer_format(); | 188 return resource_provider_->best_render_buffer_format(); |
189 } | 189 } |
190 | 190 |
191 bool GpuRasterBufferProvider::IsResourceSwizzleRequired( | 191 bool GpuRasterBufferProvider::IsResourceSwizzleRequired( |
192 bool must_support_alpha) const { | 192 bool must_support_alpha) const { |
193 // This doesn't require a swizzle because we rasterize to the correct format. | 193 // This doesn't require a swizzle because we rasterize to the correct format. |
194 return false; | 194 return false; |
195 } | 195 } |
196 | 196 |
197 bool GpuRasterBufferProvider::IsPartialRasterSupported() const { | 197 bool GpuRasterBufferProvider::CanPartialRasterIntoProvidedResource() const { |
198 return true; | 198 return true; |
199 } | 199 } |
200 | 200 |
201 void GpuRasterBufferProvider::Shutdown() { | 201 void GpuRasterBufferProvider::Shutdown() { |
202 pending_raster_buffers_.clear(); | 202 pending_raster_buffers_.clear(); |
203 } | 203 } |
204 | 204 |
205 void GpuRasterBufferProvider::PlaybackOnWorkerThread( | 205 void GpuRasterBufferProvider::PlaybackOnWorkerThread( |
206 ResourceProvider::ScopedWriteLockGL* resource_lock, | 206 ResourceProvider::ScopedWriteLockGL* resource_lock, |
207 const gpu::SyncToken& sync_token, | 207 const gpu::SyncToken& sync_token, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 gl->OrderingBarrierCHROMIUM(); | 244 gl->OrderingBarrierCHROMIUM(); |
245 | 245 |
246 // Generate sync token after the barrier for cross context synchronization. | 246 // Generate sync token after the barrier for cross context synchronization. |
247 gpu::SyncToken resource_sync_token; | 247 gpu::SyncToken resource_sync_token; |
248 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); | 248 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, resource_sync_token.GetData()); |
249 resource_lock->set_sync_token(resource_sync_token); | 249 resource_lock->set_sync_token(resource_sync_token); |
250 resource_lock->set_synchronized(!async_worker_context_enabled_); | 250 resource_lock->set_synchronized(!async_worker_context_enabled_); |
251 } | 251 } |
252 | 252 |
253 } // namespace cc | 253 } // namespace cc |
OLD | NEW |