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

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

Issue 1354483004: Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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;
}
« 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