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

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: Moved base/id_type... into gpu/command_buffer/common/id_type.… 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: 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 aa8fa3b10760735a3246849d21a6485f896afcb9..3fa28f2192c42f097789c8cc7d7958f33d1de025 100644
--- a/components/mus/gles2/command_buffer_impl.cc
+++ b/components/mus/gles2/command_buffer_impl.cc
@@ -160,7 +160,8 @@ void CommandBufferImpl::InitializeOnGpuThread(
const base::Callback<void(mojom::CommandBufferInfoPtr)>& 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)));
loss_observer_ = mojo::MakeProxy(loss_observer.PassInterface());
@@ -170,7 +171,7 @@ void CommandBufferImpl::InitializeOnGpuThread(
if (result) {
info = mojom::CommandBufferInfo::New();
info->command_buffer_namespace = driver_->GetNamespaceID();
- info->command_buffer_id = driver_->GetCommandBufferID();
+ info->command_buffer_id = driver_->GetCommandBufferID().GetUnsafeValue();
info->capabilities =
mojom::GpuCapabilities::From(driver_->GetCapabilities());
}

Powered by Google App Engine
This is Rietveld 408576698