| Index: ui/gfx/mojo/buffer_types_struct_traits.h
|
| diff --git a/ui/gfx/mojo/buffer_types_struct_traits.h b/ui/gfx/mojo/buffer_types_struct_traits.h
|
| index 0fdf909f5fc37c3fc071bb1f81779a79d3de37ed..f76e9849409fa1d930a8004a7c353087212f911c 100644
|
| --- a/ui/gfx/mojo/buffer_types_struct_traits.h
|
| +++ b/ui/gfx/mojo/buffer_types_struct_traits.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
|
| #define UI_GFX_MOJO_BUFFER_TYPES_STRUCT_TRAITS_H_
|
|
|
| +#include "build/build_config.h"
|
| #include "ui/gfx/buffer_types.h"
|
| #include "ui/gfx/mojo/buffer_types.mojom.h"
|
|
|
| @@ -173,6 +174,8 @@ struct EnumTraits<gfx::mojom::GpuMemoryBufferType, gfx::GpuMemoryBufferType> {
|
| return gfx::mojom::GpuMemoryBufferType::IO_SURFACE_BUFFER;
|
| case gfx::GpuMemoryBufferType::NATIVE_PIXMAP:
|
| return gfx::mojom::GpuMemoryBufferType::NATIVE_PIXMAP;
|
| + case gfx::GpuMemoryBufferType::DXGI_HANDLE:
|
| + return gfx::mojom::GpuMemoryBufferType::DXGI_HANDLE;
|
| }
|
| NOTREACHED();
|
| return gfx::mojom::GpuMemoryBufferType::LAST;
|
| @@ -193,6 +196,9 @@ struct EnumTraits<gfx::mojom::GpuMemoryBufferType, gfx::GpuMemoryBufferType> {
|
| case gfx::mojom::GpuMemoryBufferType::NATIVE_PIXMAP:
|
| *out = gfx::GpuMemoryBufferType::NATIVE_PIXMAP;
|
| return true;
|
| + case gfx::mojom::GpuMemoryBufferType::DXGI_HANDLE:
|
| + *out = gfx::GpuMemoryBufferType::DXGI_HANDLE;
|
| + return true;
|
| }
|
| return false;
|
| }
|
| @@ -276,6 +282,8 @@ struct StructTraits<gfx::mojom::GpuMemoryBufferHandleDataView,
|
| }
|
| static mojo::ScopedSharedBufferHandle shared_memory_handle(
|
| const gfx::GpuMemoryBufferHandle& handle);
|
| + static mojo::ScopedHandle win32_handle(
|
| + const gfx::GpuMemoryBufferHandle& handle);
|
| static uint32_t offset(const gfx::GpuMemoryBufferHandle& handle) {
|
| return handle.offset;
|
| }
|
| @@ -285,6 +293,13 @@ struct StructTraits<gfx::mojom::GpuMemoryBufferHandleDataView,
|
| static const gfx::NativePixmapHandle& native_pixmap_handle(
|
| const gfx::GpuMemoryBufferHandle& handle);
|
| static mojo::ScopedHandle mach_port(const gfx::GpuMemoryBufferHandle& handle);
|
| + static uint32_t array_level(const gfx::GpuMemoryBufferHandle& handle) {
|
| +#if defined(OS_WIN)
|
| + return handle.array_level;
|
| +#else
|
| + return 0;
|
| +#endif
|
| + }
|
| static bool Read(gfx::mojom::GpuMemoryBufferHandleDataView data,
|
| gfx::GpuMemoryBufferHandle* handle);
|
| };
|
|
|