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

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: Rebasing... 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
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.h ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5000bce210bdf42df47c9670862c27b985838983..4813c42243ff00e51d88410ecaa68ed7a81becaa 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -16,6 +16,7 @@
#include "components/mus/gles2/command_buffer_type_conversions.h"
#include "components/mus/gles2/mojo_buffer_backing.h"
#include "components/mus/gles2/mojo_gpu_memory_buffer.h"
+#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "gpu/command_buffer/service/image_factory.h"
#include "mojo/platform_handle/platform_handle_functions.h"
@@ -72,7 +73,7 @@ CommandBufferClientImpl::CommandBufferClientImpl(
: delegate_(delegate),
attribs_(attribs),
client_binding_(this),
- command_buffer_id_(0),
+ command_buffer_id_(),
shared_state_(NULL),
last_put_offset_(-1),
next_transfer_buffer_id_(0),
@@ -124,7 +125,8 @@ bool CommandBufferClientImpl::Initialize() {
DCHECK_EQ(gpu::CommandBufferNamespace::MOJO,
initialize_result->command_buffer_namespace);
- command_buffer_id_ = initialize_result->command_buffer_id;
+ command_buffer_id_ = gpu::CommandBufferId::FromUnsafeValue(
+ initialize_result->command_buffer_id);
capabilities_ = initialize_result->capabilities;
return true;
}
@@ -345,7 +347,7 @@ gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const {
return gpu::CommandBufferNamespace::MOJO;
}
-uint64_t CommandBufferClientImpl::GetCommandBufferID() const {
+gpu::CommandBufferId CommandBufferClientImpl::GetCommandBufferID() const {
return command_buffer_id_;
}
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.h ('k') | ppapi/proxy/ppapi_command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698