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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.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: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 381f354a9446a4759775e4cd9e579f48edb4e3bf..60307394f3f5cd3675feb7e1937d5ffd81d7dc40 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -24,8 +24,8 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/common/constants.h"
-#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/common/mailbox.h"
+#include "gpu/command_buffer/common/sync_token.h"
#include "gpu/command_buffer/service/gl_context_virtual.h"
#include "gpu/command_buffer/service/gl_state_restorer_impl.h"
#include "gpu/command_buffer/service/image_factory.h"
@@ -940,8 +940,9 @@ void GpuCommandBufferStub::OnRetireSyncPoint(uint32 sync_point) {
// We can simply use the global sync point number as the release count 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.
- gpu::gles2::SyncToken sync_token = {gpu::CommandBufferNamespace::GPU_IO, 0,
- sync_point};
+ gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
+ 0,
+ sync_point);
mailbox_manager->PushTextureUpdates(sync_token);
}
@@ -998,8 +999,7 @@ void GpuCommandBufferStub::PullTextureUpdates(
gpu::gles2::MailboxManager* mailbox_manager =
context_group_->mailbox_manager();
if (mailbox_manager->UsesSync() && MakeCurrent()) {
- gpu::gles2::SyncToken sync_token = {namespace_id, command_buffer_id,
- release};
+ gpu::SyncToken sync_token(namespace_id, command_buffer_id, release);
mailbox_manager->PullTextureUpdates(sync_token);
}
}
@@ -1045,8 +1045,9 @@ void GpuCommandBufferStub::OnFenceSyncRelease(uint64_t release) {
gpu::gles2::MailboxManager* mailbox_manager =
context_group_->mailbox_manager();
if (mailbox_manager->UsesSync() && MakeCurrent()) {
- gpu::gles2::SyncToken sync_token = {gpu::CommandBufferNamespace::GPU_IO,
- command_buffer_id_, release};
+ gpu::SyncToken sync_token(gpu::CommandBufferNamespace::GPU_IO,
+ command_buffer_id_,
+ release);
mailbox_manager->PushTextureUpdates(sync_token);
}
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | gpu/command_buffer/common/sync_token.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698