Upstream version 9.37.195.0
[platform/framework/web/crosswalk.git] / src / gpu / command_buffer / service / in_process_command_buffer.cc
index 20766db..b1e59a8 100644 (file)
@@ -658,8 +658,15 @@ uint32 InProcessCommandBuffer::InsertSyncPoint() {
 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);
 }
 
@@ -697,10 +704,6 @@ void InProcessCommandBuffer::SignalQuery(unsigned query,
 
 void InProcessCommandBuffer::SetSurfaceVisible(bool visible) {}
 
-void InProcessCommandBuffer::SendManagedMemoryStats(
-    const gpu::ManagedMemoryStats& stats) {
-}
-
 void InProcessCommandBuffer::Echo(const base::Closure& callback) {
   QueueTask(WrapCallback(callback));
 }