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>
This commit is contained in:
Olivier Fourdan 2024-03-13 13:57:42 +01:00 committed by Marge Bot
parent 701284f057
commit 673ed3cd6d
4 changed files with 43 additions and 3 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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"

View File

@ -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 */