Index: mojo/services/gles2/command_buffer_impl.cc |
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc |
index 78d52dde352c77d1ff9602b4852af86bebd0b113..141d04bb4f72c14ee650145cd6ba9b0f3a0cc508 100644 |
--- a/mojo/services/gles2/command_buffer_impl.cc |
+++ b/mojo/services/gles2/command_buffer_impl.cc |
@@ -18,11 +18,6 @@ void DestroyDriver(scoped_ptr<CommandBufferDriver> driver) { |
void RunCallback(const Callback<void()>& callback) { |
callback.Run(); |
} |
- |
-void RetireSyncPoint(scoped_refptr<gpu::SyncPointManager> sync_point_manager, |
- uint32_t sync_point) { |
- sync_point_manager->RetireSyncPoint(sync_point); |
-} |
} |
CommandBufferImpl::CommandBufferImpl( |
@@ -96,11 +91,20 @@ void CommandBufferImpl::DestroyTransferBuffer(int32_t id) { |
base::Unretained(driver_.get()), id)); |
} |
-void CommandBufferImpl::InsertSyncPoint() { |
+void CommandBufferImpl::InsertSyncPoint(bool retire) { |
uint32_t sync_point = sync_point_manager_->GenerateSyncPoint(); |
sync_point_client_->DidInsertSyncPoint(sync_point); |
+ if (retire) { |
+ driver_task_runner_->PostTask( |
+ FROM_HERE, base::Bind(&gpu::SyncPointManager::RetireSyncPoint, |
+ sync_point_manager_, sync_point)); |
+ } |
+} |
+ |
+void CommandBufferImpl::RetireSyncPoint(uint32_t sync_point) { |
driver_task_runner_->PostTask( |
- FROM_HERE, base::Bind(&RetireSyncPoint, sync_point_manager_, sync_point)); |
+ FROM_HERE, base::Bind(&gpu::SyncPointManager::RetireSyncPoint, |
+ sync_point_manager_, sync_point)); |
} |
void CommandBufferImpl::Echo(const Callback<void()>& callback) { |