diff options
Diffstat (limited to '0006-ozone-wayland-Implement-CreateNativePixmapAsync.patch')
-rw-r--r-- | 0006-ozone-wayland-Implement-CreateNativePixmapAsync.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/0006-ozone-wayland-Implement-CreateNativePixmapAsync.patch b/0006-ozone-wayland-Implement-CreateNativePixmapAsync.patch new file mode 100644 index 000000000000..e6d9b38cc74f --- /dev/null +++ b/0006-ozone-wayland-Implement-CreateNativePixmapAsync.patch @@ -0,0 +1,63 @@ +From 5543ce4044356138c590f1602c25bcd7cdd98169 Mon Sep 17 00:00:00 2001 +From: Maksim Sisov <msisov@igalia.com> +Date: Thu, 1 Aug 2019 08:22:39 +0000 +Subject: [PATCH 6/6] [ozone/wayland] Implement CreateNativePixmapAsync + +Fix native GpuMemoryBuffers for Ozone/Wayland by implementing +non implemented CreateNativePixmapAsync call. + +Bug: 989433 +Change-Id: Ic178ac2d4f0716e4c4a00a0abb6686e64b980b90 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728655 +Reviewed-by: Robert Kroeger <rjkroege@chromium.org> +Commit-Queue: Maksim Sisov <msisov@igalia.com> +Cr-Commit-Position: refs/heads/master@{#683102} +--- + .../platform/wayland/gpu/wayland_surface_factory.cc | 13 +++++++++++++ + .../platform/wayland/gpu/wayland_surface_factory.h | 6 ++++++ + 2 files changed, 19 insertions(+) + +diff --git a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc +index a5db42ef1b18..789488397808 100644 +--- a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc ++++ b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc +@@ -170,6 +170,19 @@ scoped_refptr<gfx::NativePixmap> WaylandSurfaceFactory::CreateNativePixmap( + #endif + } + ++void WaylandSurfaceFactory::CreateNativePixmapAsync( ++ gfx::AcceleratedWidget widget, ++ VkDevice vk_device, ++ gfx::Size size, ++ gfx::BufferFormat format, ++ gfx::BufferUsage usage, ++ NativePixmapCallback callback) { ++ // CreateNativePixmap is non-blocking operation. Thus, it is safe to call it ++ // and return the result with the provided callback. ++ std::move(callback).Run( ++ CreateNativePixmap(widget, vk_device, size, format, usage)); ++} ++ + scoped_refptr<gfx::NativePixmap> + WaylandSurfaceFactory::CreateNativePixmapFromHandle( + gfx::AcceleratedWidget widget, +diff --git a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.h b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.h +index 23f4f92a5959..53545ed9a328 100644 +--- a/ui/ozone/platform/wayland/gpu/wayland_surface_factory.h ++++ b/ui/ozone/platform/wayland/gpu/wayland_surface_factory.h +@@ -37,6 +37,12 @@ class WaylandSurfaceFactory : public SurfaceFactoryOzone { + gfx::Size size, + gfx::BufferFormat format, + gfx::BufferUsage usage) override; ++ void CreateNativePixmapAsync(gfx::AcceleratedWidget widget, ++ VkDevice vk_device, ++ gfx::Size size, ++ gfx::BufferFormat format, ++ gfx::BufferUsage usage, ++ NativePixmapCallback callback) override; + scoped_refptr<gfx::NativePixmap> CreateNativePixmapFromHandle( + gfx::AcceleratedWidget widget, + gfx::Size size, +-- +2.23.0 + |