diff options
Diffstat (limited to 'recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch')
-rw-r--r-- | recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch b/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch deleted file mode 100644 index d8a55352..00000000 --- a/recipes-multimedia/onevpl/onevpl/0002-sample_misc-Addin-basic-wayland-dmabuf-support.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 047b7865a69e26c9091b22dceceae1b609a3efbc Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 14:19:40 +0000 | ||
4 | Subject: [PATCH 2/3] sample_misc: Addin basic wayland dmabuf support. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | tools/legacy/sample_misc/wayland/include/class_wayland.h | 16 ++++++++++++++++ | ||
11 | tools/legacy/sample_misc/wayland/src/class_wayland.cpp | 8 ++++++++ | ||
12 | 2 files changed, 24 insertions(+) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_misc/wayland/include/class_wayland.h b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
15 | index 29f724f..753b8b1 100644 | ||
16 | --- a/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
17 | +++ b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
18 | @@ -19,6 +19,9 @@ extern "C" { | ||
19 | #include "sample_defs.h" | ||
20 | #include "vpl/mfxstructures.h" | ||
21 | #include "wayland-drm-client-protocol.h" | ||
22 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
23 | + #include "linux-dmabuf-unstable-v1.h" | ||
24 | +#endif | ||
25 | |||
26 | typedef struct buffer wld_buffer; | ||
27 | |||
28 | @@ -80,6 +83,11 @@ public: | ||
29 | struct wl_drm* GetDrm() { | ||
30 | return m_drm; | ||
31 | } | ||
32 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
33 | + struct zwp_linux_dmabuf_v1* GetDMABuf() { | ||
34 | + return m_dmabuf; | ||
35 | + } | ||
36 | +#endif | ||
37 | struct wl_shm* GetShm() { | ||
38 | return m_shm; | ||
39 | }; | ||
40 | @@ -107,6 +115,11 @@ public: | ||
41 | void SetDrm(struct wl_drm* drm) { | ||
42 | m_drm = drm; | ||
43 | } | ||
44 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
45 | + void SetDMABuf(struct zwp_linux_dmabuf_v1* dmabuf) { | ||
46 | + m_dmabuf = dmabuf; | ||
47 | + } | ||
48 | +#endif | ||
49 | void DrmHandleDevice(const char* device); | ||
50 | void DrmHandleAuthenticated(); | ||
51 | void RegistryGlobal(struct wl_registry* registry, | ||
52 | @@ -134,6 +147,9 @@ private: | ||
53 | struct wl_compositor* m_compositor; | ||
54 | struct wl_shell* m_shell; | ||
55 | struct wl_drm* m_drm; | ||
56 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
57 | + struct zwp_linux_dmabuf_v1* m_dmabuf; | ||
58 | +#endif | ||
59 | struct wl_shm* m_shm; | ||
60 | struct wl_shm_pool* m_pool; | ||
61 | struct wl_surface* m_surface; | ||
62 | diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
63 | index c5e3359..7eac204 100644 | ||
64 | --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
65 | +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
66 | @@ -37,6 +37,9 @@ Wayland::Wayland() | ||
67 | m_compositor(NULL), | ||
68 | m_shell(NULL), | ||
69 | m_drm(NULL), | ||
70 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
71 | + m_dmabuf(NULL), | ||
72 | +#endif | ||
73 | m_shm(NULL), | ||
74 | m_pool(NULL), | ||
75 | m_surface(NULL), | ||
76 | @@ -347,6 +350,11 @@ void Wayland::RegistryGlobal(struct wl_registry* registry, | ||
77 | m_drm = static_cast<wl_drm*>(wl_registry_bind(registry, name, &wl_drm_interface, 2)); | ||
78 | wl_drm_add_listener(m_drm, &drm_listener, this); | ||
79 | } | ||
80 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
81 | + else if(0 == strcmp(interface, "zwp_linux_dmabuf_v1")) | ||
82 | + m_dmabuf = static_cast<zwp_linux_dmabuf_v1*>( | ||
83 | + wl_registry_bind(registry, name, &zwp_linux_dmabuf_v1_interface, version)); | ||
84 | +#endif | ||
85 | } | ||
86 | |||
87 | void Wayland::DrmHandleDevice(const char* name) { | ||
88 | -- | ||
89 | 2.7.4 | ||
90 | |||