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

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

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted some unnecesary changes, fixed some small issues Created 5 years, 3 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 9711aad60051632cd5b488da0e7a67afb1e9900a..be9d6dad35b0fbad1d7c4d1012b0587c5ecbedfc 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -19,6 +19,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/value_state.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/context_group.h"
@@ -797,8 +798,14 @@ void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) {
base::AutoLock lock(command_buffer_lock_);
make_current_success = MakeCurrent();
}
- if (make_current_success)
- mailbox_manager->PushTextureUpdates(sync_point);
+ if (make_current_success) {
+ gles2::SyncToken sync_token = {
+ GetNamespaceID(),
+ GetCommandBufferID(),
+ sync_point
+ };
+ mailbox_manager->PushTextureUpdates(sync_token);
+ }
}
service_->sync_point_manager()->RetireSyncPoint(sync_point);
}
@@ -816,7 +823,12 @@ bool InProcessCommandBuffer::WaitSyncPointOnGpuThread(unsigned sync_point) {
service_->sync_point_manager()->WaitSyncPoint(sync_point);
gles2::MailboxManager* mailbox_manager =
decoder_->GetContextGroup()->mailbox_manager();
- mailbox_manager->PullTextureUpdates(sync_point);
+ gles2::SyncToken sync_token = {
+ GetNamespaceID(),
+ GetCommandBufferID(),
+ sync_point
+ };
+ mailbox_manager->PullTextureUpdates(sync_token);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698