diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2024-03-13 13:57:42 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-18 15:41:17 +0000 |
commit | 673ed3cd6daca4717e3a6498bc7643ecb7a1571f (patch) | |
tree | 943953079445fe6a02d772d6ef616fdf57306dfe /hw/xwayland | |
parent | 701284f057b41bba0b0cc4b3f851958af95ac978 (diff) |
xwayland/glamor: Add a GLAMOR GBM header
That will be used between the generic Xwayland GLAMOR functions and the
GBM implementation.
Move the definition of xwl_glamor_init_gbm() to that new header rather
than in the generic Xwayland GLAMOR header.
This is preparation work to eventually replace the xwl_egl_backend now
that we have only one backend left.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
Diffstat (limited to 'hw/xwayland')
-rw-r--r-- | hw/xwayland/meson.build | 3 | ||||
-rw-r--r-- | hw/xwayland/xwayland-glamor-gbm.h | 39 | ||||
-rw-r--r-- | hw/xwayland/xwayland-glamor.c | 1 | ||||
-rw-r--r-- | hw/xwayland/xwayland-glamor.h | 3 |
4 files changed, 43 insertions, 3 deletions
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build index b61d4c0ee..4d878dae8 100644 --- a/hw/xwayland/meson.build +++ b/hw/xwayland/meson.build @@ -107,7 +107,8 @@ if build_xwayland_glamor 'xwayland-glamor.c', 'xwayland-dmabuf.h', 'xwayland-dmabuf.c', - 'xwayland-glamor-gbm.c' + 'xwayland-glamor-gbm.c', + 'xwayland-glamor-gbm.h' ] if build_xv diff --git a/hw/xwayland/xwayland-glamor-gbm.h b/hw/xwayland/xwayland-glamor-gbm.h new file mode 100644 index 000000000..411b11aec --- /dev/null +++ b/hw/xwayland/xwayland-glamor-gbm.h @@ -0,0 +1,39 @@ +/* + * Copyright © 2011-2014 Intel Corporation + * Copyright © 2024 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including + * the next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef XWAYLAND_GLAMOR_GBM_H +#define XWAYLAND_GLAMOR_GBM_H + +#include <xwayland-config.h> + +#include <sys/types.h> + +#include "xwayland-types.h" + +void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen); + +#endif /* XWAYLAND_GLAMOR_GBM_H */ diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index b35aa25c2..086af6a82 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -43,6 +43,7 @@ #include "xwayland-dmabuf.h" #include "xwayland-glamor.h" +#include "xwayland-glamor-gbm.h" #include "xwayland-screen.h" #include "xwayland-window.h" #include "xwayland-window-buffers.h" diff --git a/hw/xwayland/xwayland-glamor.h b/hw/xwayland/xwayland-glamor.h index 8e640277e..9f7b19c35 100644 --- a/hw/xwayland/xwayland-glamor.h +++ b/hw/xwayland/xwayland-glamor.h @@ -34,6 +34,7 @@ #include <xf86drm.h> #include "xwayland-types.h" +#include "xwayland-glamor-gbm.h" typedef enum _xwl_egl_backend_flags { XWL_EGL_BACKEND_NO_FLAG = 0, @@ -145,8 +146,6 @@ PixmapPtr xwl_glamor_create_pixmap_for_window (struct xwl_window *xwl_window); Bool xwl_glamor_xv_init(ScreenPtr pScreen); #endif /* XV */ -void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen); - #endif /* XWL_HAS_GLAMOR */ #endif /* XWAYLAND_GLAMOR_H */ |