Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 407683002: Add missing lock in RetireSyncPointOnGpuThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698