From 673ed3cd6daca4717e3a6498bc7643ecb7a1571f Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 13 Mar 2024 13:57:42 +0100 Subject: [PATCH] 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 Part-of: --- hw/xwayland/meson.build | 3 ++- hw/xwayland/xwayland-glamor-gbm.h | 39 +++++++++++++++++++++++++++++++ hw/xwayland/xwayland-glamor.c | 1 + hw/xwayland/xwayland-glamor.h | 3 +-- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 hw/xwayland/xwayland-glamor-gbm.h 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 + +#include + +#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 #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 */