xwayland: Add xwayland-config.h
Just a small autogenerated header that will soon contain more then just one macro. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
1545e2dbad
commit
994f781007
|
@ -67,6 +67,8 @@ dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.
|
|||
AC_CONFIG_HEADERS(include/xkb-config.h)
|
||||
dnl xwin-config.h covers the XWin DDX.
|
||||
AC_CONFIG_HEADERS(include/xwin-config.h)
|
||||
dnl xwayland-config.h covers Xwayland.
|
||||
AC_CONFIG_HEADERS(include/xwayland-config.h)
|
||||
dnl version-config.h covers the version numbers so they can be bumped without
|
||||
dnl forcing an entire recompile.x
|
||||
AC_CONFIG_HEADERS(include/version-config.h)
|
||||
|
@ -2378,6 +2380,11 @@ if test "x$XWAYLAND" = xyes; then
|
|||
AC_MSG_ERROR([Xwayland build explicitly requested, but required modules not found.])
|
||||
fi
|
||||
|
||||
if test "x$GLAMOR" = xyes && test "x$GBM" = xyes; then
|
||||
AC_DEFINE(XWL_HAS_GLAMOR, 1,
|
||||
[Build xwayland with glamor support])
|
||||
fi
|
||||
|
||||
XWAYLAND_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
|
||||
XWAYLAND_SYS_LIBS="$XWAYLANDMODULES_LIBS $GLX_SYS_LIBS"
|
||||
AC_SUBST([XWAYLAND_LIBS])
|
||||
|
|
|
@ -668,7 +668,7 @@ xwl_window_post_damage(struct xwl_window *xwl_window)
|
|||
region = DamageRegion(xwl_window->damage);
|
||||
pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor)
|
||||
buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap,
|
||||
pixmap->drawable.width,
|
||||
|
@ -754,7 +754,7 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id,
|
|||
wl_registry_bind(registry, id, &zxdg_output_manager_v1_interface, 1);
|
||||
xwl_screen_init_xdg_output(xwl_screen);
|
||||
}
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
else if (xwl_screen->glamor) {
|
||||
xwl_glamor_init_wl_registry(xwl_screen, registry, id, interface,
|
||||
version);
|
||||
|
@ -938,7 +938,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen);
|
||||
xwl_screen->screen = pScreen;
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
xwl_screen->glamor = 1;
|
||||
#endif
|
||||
|
||||
|
@ -966,12 +966,14 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor) {
|
||||
if (!xwl_glamor_init_gbm(xwl_screen)) {
|
||||
ErrorF("xwayland glamor: failed to setup GBM backend, falling back to sw accel\n");
|
||||
xwl_screen->glamor = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* In rootless mode, we don't have any screen storage, and the only
|
||||
* rendering should be to redirected mode. */
|
||||
|
@ -1055,7 +1057,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
|
|||
if (!xwl_screen_init_cursor(xwl_screen))
|
||||
return FALSE;
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
#ifdef XWL_HAS_GLAMOR
|
||||
if (xwl_screen->glamor && !xwl_glamor_init(xwl_screen)) {
|
||||
ErrorF("Failed to initialize glamor, falling back to sw\n");
|
||||
xwl_screen->glamor = 0;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef XWAYLAND_H
|
||||
#define XWAYLAND_H
|
||||
|
||||
#include <dix-config.h>
|
||||
#include <xwayland-config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -359,6 +359,13 @@ configure_file(output : 'xwin-config.h',
|
|||
input : 'xwin-config.h.meson.in',
|
||||
configuration : xwin_data)
|
||||
|
||||
xwayland_data = configuration_data()
|
||||
xwayland_data.set('XWL_HAS_GLAMOR', build_glamor and gbm_dep.found())
|
||||
|
||||
configure_file(output : 'xwayland-config.h',
|
||||
input : 'xwayland-config.h.meson.in',
|
||||
configuration : xwayland_data)
|
||||
|
||||
if build_xorg
|
||||
install_data(
|
||||
[
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* xwayland-config.h.in: not at all generated. */
|
||||
#ifndef _XWAYLAND_CONFIG_H_
|
||||
#define _XWAYLAND_CONFIG_H_
|
||||
|
||||
#include <dix-config.h>
|
||||
|
||||
/* Build glamor support for Xwayland */
|
||||
#undef XWL_HAS_GLAMOR
|
||||
|
||||
#endif /* _XWAYLAND_CONFIG_H_ */
|
|
@ -0,0 +1,8 @@
|
|||
/* xwayland-config.h.meson.in: not at all generated */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <dix-config.h>
|
||||
|
||||
/* Build glamor support for Xwayland */
|
||||
#mesondefine XWL_HAS_GLAMOR
|
Loading…
Reference in New Issue