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

Unified Diff: components/mus/gles2/command_buffer_driver.cc

Issue 1390143002: Revert of Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/BUILD.gn ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gles2/command_buffer_driver.cc
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index 31ebae934110762d6ad5d57e04c0c2f2fa2054a6..a03a357f1a24d01d21fa13f1d7a3a47fa5735c38 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -230,6 +230,11 @@
return;
}
+ gfx::GpuMemoryBufferHandle gfx_handle;
+ // TODO(jam): create mojo enum for this and converter
+ gfx_handle.type = static_cast<gfx::GpuMemoryBufferType>(type);
+ gfx_handle.id = gfx::GpuMemoryBufferId(id);
+
MojoPlatformHandle platform_handle;
MojoResult extract_result = MojoExtractPlatformHandle(
memory_handle.release().value(), &platform_handle);
@@ -238,17 +243,17 @@
return;
}
- base::SharedMemoryHandle handle;
#if defined(OS_WIN)
- handle = base::SharedMemoryHandle(platform_handle, base::GetCurrentProcId());
+ gfx_handle.handle =
+ base::SharedMemoryHandle(platform_handle, base::GetCurrentProcId());
#else
- handle = base::FileDescriptor(platform_handle, false);
+ gfx_handle.handle = base::FileDescriptor(platform_handle, false);
#endif
scoped_refptr<gfx::GLImageSharedMemory> image =
new gfx::GLImageSharedMemory(gfx_size, internal_format);
// TODO(jam): also need a mojo enum for this enum
- if (!image->Initialize(handle, gfx::GpuMemoryBufferId(id), gpu_format)) {
+ if (!image->Initialize(gfx_handle, gpu_format)) {
NOTREACHED();
return;
}
« no previous file with comments | « components/mus/BUILD.gn ('k') | components/mus/mus_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698