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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Created 4 years, 10 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: mojo/gles2/command_buffer_client_impl.cc
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index 5706af0d5d5e497d45c1497e8bf92fa41d5b04f0..3c19ea7b7191720c1d6af6156402a1dfa4cba0d1 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -66,7 +66,7 @@ CommandBufferClientImpl::CommandBufferClientImpl(
: delegate_(delegate),
attribs_(attribs),
observer_binding_(this),
- command_buffer_id_(0),
+ command_buffer_id_(),
shared_state_(NULL),
last_put_offset_(-1),
next_transfer_buffer_id_(0),
@@ -116,7 +116,8 @@ bool CommandBufferClientImpl::Initialize() {
}
DCHECK_EQ(gpu::CommandBufferNamespace::MOJO, info->command_buffer_namespace);
- command_buffer_id_ = info->command_buffer_id;
+ command_buffer_id_ =
+ gpu::CommandBufferId::FromUnsafeValue(info->command_buffer_id);
capabilities_ = info->capabilities.To<gpu::Capabilities>();
return true;
}
@@ -323,7 +324,7 @@ gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const {
return gpu::CommandBufferNamespace::MOJO;
}
-uint64_t CommandBufferClientImpl::GetCommandBufferID() const {
+gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const {
return command_buffer_id_;
}

Powered by Google App Engine
This is Rietveld 408576698