| Index: components/exo/wayland/server.cc
|
| diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
|
| index f746de2bd6156df06406bac62f342c39dfd43d05..9d42f70bce73c96a5bd70a3a3449866921631600 100644
|
| --- a/components/exo/wayland/server.cc
|
| +++ b/components/exo/wayland/server.cc
|
| @@ -83,6 +83,10 @@
|
| #include <drm_fourcc.h>
|
| #include <linux-dmabuf-unstable-v1-server-protocol.h>
|
| #include <wayland-drm-server-protocol.h>
|
| +
|
| +#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
|
| +#include "ui/aura/env.h"
|
| +#include "ui/ozone/platform/drm/common/drm_util.h"
|
| #endif
|
|
|
| #if BUILDFLAG(USE_XKBCOMMON)
|
| @@ -762,8 +766,19 @@ void bind_linux_dmabuf(wl_client* client,
|
| wl_resource_set_implementation(resource, &linux_dmabuf_implementation, data,
|
| nullptr);
|
|
|
| +#if defined(USE_OZONE)
|
| + gfx::GpuMemoryBufferAttribVector attrs = aura::Env::GetInstance()
|
| + ->context_factory()
|
| + ->GetGpuMemoryBufferManager()
|
| + ->GetGpuMemoryBufferAttribs();
|
| +
|
| + for (const auto attrib : attrs)
|
| + zwp_linux_dmabuf_v1_send_format(
|
| + resource, ui::GetFourCCFormatFromBufferFormat(attrib.format));
|
| +#else
|
| for (const auto& supported_format : dmabuf_supported_formats)
|
| zwp_linux_dmabuf_v1_send_format(resource, supported_format.dmabuf_format);
|
| +#endif
|
| }
|
|
|
| #endif
|
|
|