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

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

Issue 1394543003: Added SyncToken command buffer trait to help with IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 13fc8adea3fc9ac763dcfa038465a2ae06a07463..a798710d563aafb7917c944efdfa2aabdb3884cc 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -19,7 +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/sync_token.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"
@@ -817,8 +817,7 @@ void InProcessCommandBuffer::RetireSyncPointOnGpuThread(uint32 sync_point) {
// We can simply use the GPUIO namespace with 0 for the command buffer ID
// (under normal circumstances 0 is invalid so will not be used) until
// the old sync points are replaced.
- gles2::SyncToken sync_token = {gpu::CommandBufferNamespace::GPU_IO, 0,
- sync_point};
+ SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, sync_point);
mailbox_manager->PushTextureUpdates(sync_token);
}
}
@@ -842,8 +841,7 @@ bool InProcessCommandBuffer::WaitSyncPointOnGpuThread(unsigned sync_point) {
// We can simply use the GPUIO namespace with 0 for the command buffer ID
// (under normal circumstances 0 is invalid so will not be used) until
// the old sync points are replaced.
- gles2::SyncToken sync_token = {gpu::CommandBufferNamespace::GPU_IO, 0,
- sync_point};
+ SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO, 0, sync_point);
mailbox_manager->PullTextureUpdates(sync_token);
return true;
}
@@ -859,8 +857,7 @@ void InProcessCommandBuffer::FenceSyncReleaseOnGpuThread(uint64_t release) {
make_current_success = MakeCurrent();
}
if (make_current_success) {
- gles2::SyncToken sync_token = {GetNamespaceID(), GetCommandBufferID(),
- release};
+ SyncToken sync_token(GetNamespaceID(), GetCommandBufferID(), release);
mailbox_manager->PushTextureUpdates(sync_token);
}
}
@@ -893,7 +890,7 @@ bool InProcessCommandBuffer::WaitFenceSyncOnGpuThread(
gles2::MailboxManager* mailbox_manager =
decoder_->GetContextGroup()->mailbox_manager();
- gles2::SyncToken sync_token = {namespace_id, command_buffer_id, release};
+ SyncToken sync_token(namespace_id, command_buffer_id, release);
mailbox_manager->PullTextureUpdates(sync_token);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698