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

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

Issue 661973003: MailboxSync: Imply fence with sync point (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 310fcedcccb18385bb1b7c84d57f8ddb545c0f3f..ba2d6e4c8948dc88c8daae14aea81a1f5c4cedb1 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -422,7 +422,9 @@ bool InProcessCommandBuffer::InitializeOnGpuThread(
decoder_->SetResizeCallback(base::Bind(
&InProcessCommandBuffer::OnResizeView, gpu_thread_weak_ptr_));
}
- decoder_->SetWaitSyncPointCallback(base::Bind(&WaitSyncPoint));
+ decoder_->SetWaitSyncPointCallback(
+ base::Bind(&InProcessCommandBuffer::WaitSyncPointOnGpuThread,
+ base::Unretained(this)));
return true;
}
@@ -658,7 +660,7 @@ void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) {
make_current_success = MakeCurrent();
}
if (make_current_success)
- mailbox_manager->PushTextureUpdates();
+ mailbox_manager->PushTextureUpdates(sync_point);
}
g_sync_point_manager.Get().RetireSyncPoint(sync_point);
}
@@ -672,6 +674,14 @@ void InProcessCommandBuffer::SignalSyncPoint(unsigned sync_point,
WrapCallback(callback)));
}
+bool InProcessCommandBuffer::WaitSyncPointOnGpuThread(unsigned sync_point) {
+ WaitSyncPoint(sync_point);
+ gles2::MailboxManager* mailbox_manager =
+ decoder_->GetContextGroup()->mailbox_manager();
+ mailbox_manager->PullTextureUpdates(sync_point);
+ return true;
+}
+
void InProcessCommandBuffer::SignalSyncPointOnGpuThread(
unsigned sync_point,
const base::Closure& callback) {
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/service/mailbox_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698