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 aca7d41116ea1207c50da9e14c1642b93ba0e470..a03ad56ac03c6b10f2405a412c7bf209d63abf15 100644 |
--- a/components/mus/gles2/command_buffer_driver.cc |
+++ b/components/mus/gles2/command_buffer_driver.cc |
@@ -234,11 +234,6 @@ void CommandBufferDriver::CreateImage(int32_t id, |
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); |
@@ -247,17 +242,17 @@ void CommandBufferDriver::CreateImage(int32_t id, |
return; |
} |
+ base::SharedMemoryHandle handle; |
#if defined(OS_WIN) |
- gfx_handle.handle = |
- base::SharedMemoryHandle(platform_handle, base::GetCurrentProcId()); |
+ handle = base::SharedMemoryHandle(platform_handle, base::GetCurrentProcId()); |
#else |
- gfx_handle.handle = base::FileDescriptor(platform_handle, false); |
+ 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(gfx_handle, gpu_format)) { |
+ if (!image->Initialize(handle, gfx::GpuMemoryBufferId(id), gpu_format)) { |
NOTREACHED(); |
return; |
} |