Chromium Code Reviews| Index: gpu/command_buffer/client/gles2_implementation.cc |
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc |
| index f0e4e9b38cca34390d136389773384d5b2a81a1a..1675d1cbae941c0fa036f028cc9fbc9a83ae2fa9 100644 |
| --- a/gpu/command_buffer/client/gles2_implementation.cc |
| +++ b/gpu/command_buffer/client/gles2_implementation.cc |
| @@ -5366,6 +5366,11 @@ GLuint GLES2Implementation::InsertSyncPointCHROMIUM() { |
| return gpu_control_->InsertSyncPoint(); |
| } |
| +void GLES2Implementation::WaitSyncPointCHROMIUM(GLuint sync_point) { |
| + // This should no longer be called. |
| + CHECK(false); |
|
piman
2015/10/29 00:08:20
nit: NOTREACHED()
David Yen
2015/10/29 17:08:08
Done.
|
| +} |
| + |
| GLuint GLES2Implementation::InsertFutureSyncPointCHROMIUM() { |
| GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInsertFutureSyncPointCHROMIUM"); |
| @@ -5453,9 +5458,20 @@ void GLES2Implementation::WaitSyncTokenCHROMIUM(const GLbyte* sync_token) { |
| return; |
| } |
| - helper_->WaitSyncTokenCHROMIUM(sync_token_data.namespace_id(), |
| - sync_token_data.command_buffer_id(), |
| - sync_token_data.release_count()); |
| + // TODO(dyen): Temporarily support old sync points, remove once all old sync |
| + // points have been removed. |
| + const gpu::CommandBufferNamespace namespace_id = |
| + sync_token_data.namespace_id(); |
| + if (namespace_id == gpu::CommandBufferNamespace::OLD_SYNC_POINTS) { |
| + const uint32_t sync_point = |
| + static_cast<uint32_t>(sync_token_data.release_count()); |
| + helper_->WaitSyncPointCHROMIUM(sync_point); |
| + return; |
| + } |
| + |
| + helper_->WaitSyncTokenCHROMIUM( |
| + static_cast<GLuint>(sync_token_data.namespace_id()), |
| + sync_token_data.command_buffer_id(), sync_token_data.release_count()); |
| } |
| namespace { |