summaryrefslogtreecommitdiffstats
path: root/components/mus
diff options
context:
space:
mode:
Diffstat (limited to 'components/mus')
-rw-r--r--components/mus/BUILD.gn1
-rw-r--r--components/mus/gles2/command_buffer_driver.cc13
-rw-r--r--components/mus/mus_app.cc1
-rw-r--r--components/mus/vm/BUILD.gn1
4 files changed, 12 insertions, 4 deletions
diff --git a/components/mus/BUILD.gn b/components/mus/BUILD.gn
index ec34ba8..098bd30 100644
--- a/components/mus/BUILD.gn
+++ b/components/mus/BUILD.gn
@@ -58,6 +58,7 @@ source_set("lib") {
"//mojo/common:tracing_impl",
"//ui/events",
"//ui/gl:gl",
+ "//ui/gl:test_support",
"//ui/platform_window:platform_impls",
"//ui/platform_window:platform_window",
]
diff --git a/components/mus/gles2/command_buffer_driver.cc b/components/mus/gles2/command_buffer_driver.cc
index 31ebae9..a03a357 100644
--- a/components/mus/gles2/command_buffer_driver.cc
+++ b/components/mus/gles2/command_buffer_driver.cc
@@ -230,6 +230,11 @@ 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);
@@ -238,17 +243,17 @@ void CommandBufferDriver::CreateImage(int32_t id,
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;
}
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index 120fc79..4c30240 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -21,6 +21,7 @@
#include "ui/events/event_switches.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gl/gl_surface.h"
+#include "ui/gl/test/gl_surface_test_support.h"
#if defined(USE_X11)
#include <X11/Xlib.h>
diff --git a/components/mus/vm/BUILD.gn b/components/mus/vm/BUILD.gn
index 4bb7241..d660c84 100644
--- a/components/mus/vm/BUILD.gn
+++ b/components/mus/vm/BUILD.gn
@@ -68,6 +68,7 @@ source_set("lib") {
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl:gl",
+ "//ui/gl:test_support",
"//ui/mojo/events:interfaces",
"//ui/mojo/geometry:interfaces",
"//ui/platform_window:platform_impls",