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

Unified Diff: components/mus/gles2/command_buffer_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 | « components/mus/gles2/command_buffer_driver.cc ('k') | components/mus/gles2/command_buffer_local.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_impl.cc
diff --git a/components/mus/gles2/command_buffer_impl.cc b/components/mus/gles2/command_buffer_impl.cc
index 0c69eea34bb8b99b26be101e55d7222cc3270f4f..adb58456e7a6ec57fa703bd3a7a337177c59376c 100644
--- a/components/mus/gles2/command_buffer_impl.cc
+++ b/components/mus/gles2/command_buffer_impl.cc
@@ -189,7 +189,8 @@ void CommandBufferImpl::InitializeOnGpuThread(
void(mojom::CommandBufferInitializeResultPtr)>& callback) {
DCHECK(!driver_);
driver_.reset(new CommandBufferDriver(
- gpu::CommandBufferNamespace::MOJO, ++g_next_command_buffer_id,
+ gpu::CommandBufferNamespace::MOJO,
+ gpu::CommandBufferId::FromUnsafeValue(++g_next_command_buffer_id),
gfx::kNullAcceleratedWidget, gpu_state_));
driver_->set_client(make_scoped_ptr(new CommandBufferDriverClientImpl(this)));
client_ = mojo::MakeProxy(client.PassInterface());
@@ -199,7 +200,8 @@ void CommandBufferImpl::InitializeOnGpuThread(
if (result) {
initialize_result = mojom::CommandBufferInitializeResult::New();
initialize_result->command_buffer_namespace = driver_->GetNamespaceID();
- initialize_result->command_buffer_id = driver_->GetCommandBufferID();
+ initialize_result->command_buffer_id =
+ driver_->GetCommandBufferID().GetUnsafeValue();
initialize_result->capabilities = driver_->GetCapabilities();
}
gpu_state_->control_task_runner()->PostTask(
« no previous file with comments | « components/mus/gles2/command_buffer_driver.cc ('k') | components/mus/gles2/command_buffer_local.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698