Index: gpu/command_buffer/service/in_process_command_buffer.cc |
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc |
index db2684f1b5666bcc75c6688c4fd4694639bfef9f..4a3def924a8879812d6d571d17eb413decec70fc 100644 |
--- a/gpu/command_buffer/service/in_process_command_buffer.cc |
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc |
@@ -698,8 +698,15 @@ void InProcessCommandBuffer::RetireSyncPoint(uint32 sync_point) { |
void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) { |
gles2::MailboxManager* mailbox_manager = |
decoder_->GetContextGroup()->mailbox_manager(); |
- if (mailbox_manager->UsesSync() && MakeCurrent()) |
- mailbox_manager->PushTextureUpdates(); |
+ if (mailbox_manager->UsesSync()) { |
+ bool make_current_success = false; |
+ { |
+ base::AutoLock lock(command_buffer_lock_); |
+ make_current_success = MakeCurrent(); |
+ } |
+ if (make_current_success) |
+ mailbox_manager->PushTextureUpdates(); |
+ } |
g_sync_point_manager.Get().RetireSyncPoint(sync_point); |
} |