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

Unified Diff: components/mus/gles2/command_buffer_local.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_local.h ('k') | content/browser/download/save_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_local.cc
diff --git a/components/mus/gles2/command_buffer_local.cc b/components/mus/gles2/command_buffer_local.cc
index 649161e63adb3b043efb7f4cde27396158f596a2..b45b0f9b9b5615e0da95a2102d8fe11d70ad9d82 100644
--- a/components/mus/gles2/command_buffer_local.cc
+++ b/components/mus/gles2/command_buffer_local.cc
@@ -323,7 +323,7 @@ gpu::CommandBufferNamespace CommandBufferLocal::GetNamespaceID() const {
return gpu::CommandBufferNamespace::MOJO_LOCAL;
}
-uint64_t CommandBufferLocal::GetCommandBufferID() const {
+gpu::CommandBufferId CommandBufferLocal::GetCommandBufferID() const {
DCHECK(CalledOnValidThread());
return driver_->GetCommandBufferID();
}
@@ -421,9 +421,10 @@ void CommandBufferLocal::MakeProgressAndUpdateState() {
void CommandBufferLocal::InitializeOnGpuThread(base::WaitableEvent* event,
bool* result) {
- driver_.reset(new CommandBufferDriver(gpu::CommandBufferNamespace::MOJO_LOCAL,
- ++g_next_command_buffer_id, widget_,
- gpu_state_));
+ driver_.reset(new CommandBufferDriver(
+ gpu::CommandBufferNamespace::MOJO_LOCAL,
+ gpu::CommandBufferId::FromUnsafeValue(++g_next_command_buffer_id),
+ widget_, gpu_state_));
const size_t kSharedStateSize = sizeof(gpu::CommandBufferSharedState);
void* memory = nullptr;
mojo::ScopedSharedBufferHandle duped;
« no previous file with comments | « components/mus/gles2/command_buffer_local.h ('k') | content/browser/download/save_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698