xwayland: Bump to 22.1.8
Co-authored-by: Twaik Yont <twaikyont@gmail.com>
This commit is contained in:
parent
61d7a79d57
commit
fec432a05a
|
@ -2,83 +2,46 @@ TERMUX_PKG_HOMEPAGE=https://xorg.freedesktop.org/wiki/
|
|||
TERMUX_PKG_DESCRIPTION="Wayland X11 server"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.20.5
|
||||
TERMUX_PKG_REVISION=17
|
||||
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libpciaccess, libpixman, libx11, libxau, libxfont2, libxinerama, libxkbfile, libxshmfence, opengl, openssl, xkeyboard-config, xorg-xkbcomp, libwayland, libwayland-protocols, libepoxy"
|
||||
TERMUX_PKG_VERSION=22.1.8
|
||||
TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xwayland-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libepoxy, libpciaccess, libpixman, libwayland, libwayland-protocols, libx11, libxau, libxcvt, libxfont2, libxinerama, libxkbfile, libxshmfence, opengl, openssl, xkeyboard-config, xorg-protocol-txt, xorg-xkbcomp"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libwayland-cross-scanner, mesa-dev"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
ac_cv_path_RAWCPP=/usr/bin/cpp
|
||||
ac_cv_path_WAYLAND_SCANNER=$TERMUX_PREFIX/opt/libwayland/cross/bin/wayland-scanner
|
||||
--enable-composite
|
||||
--enable-mitshm
|
||||
--enable-xres
|
||||
--enable-record
|
||||
--enable-xv
|
||||
--enable-xvmc
|
||||
--enable-dga
|
||||
--enable-screensaver
|
||||
--enable-xdmcp
|
||||
--enable-glx
|
||||
--disable-dri
|
||||
--disable-dri2
|
||||
--enable-dri3
|
||||
--enable-present
|
||||
--enable-xinerama
|
||||
--enable-xf86vidmode
|
||||
--enable-xace
|
||||
--enable-xcsecurity
|
||||
--enable-dbe
|
||||
--enable-xf86bigfont
|
||||
--disable-xfree86-utils
|
||||
--disable-vgahw
|
||||
--disable-vbe
|
||||
--disable-int10-module
|
||||
--enable-libdrm
|
||||
--disable-pciaccess
|
||||
--disable-linux-acpi
|
||||
--disable-linux-apm
|
||||
--disable-xorg
|
||||
--disable-glamor
|
||||
--disable-dmx
|
||||
--disable-xvfb
|
||||
--disable-xnest
|
||||
--enable-xwayland
|
||||
--disable-xwin
|
||||
--disable-kdrive
|
||||
--disable-xephyr
|
||||
--disable-libunwind
|
||||
--enable-xshmfence
|
||||
--enable-ipv6
|
||||
--with-sha1=libcrypto
|
||||
--with-fontrootdir=${TERMUX_PREFIX}/share/fonts
|
||||
--with-xkb-path=${TERMUX_PREFIX}/share/X11/xkb
|
||||
--with-serverconfig-path=${TERMUX_PREFIX}/etc/xwayland
|
||||
LIBS=-landroid-shmem"
|
||||
-Dmitshm=true
|
||||
-Dxres=true
|
||||
-Dxv=true
|
||||
-Dsecure-rpc=false
|
||||
-Dscreensaver=true
|
||||
-Dxdmcp=true
|
||||
-Dglx=true
|
||||
-Ddri3=true
|
||||
-Dxinerama=true
|
||||
-Dxace=true
|
||||
-Dxcsecurity=true
|
||||
-Dxf86bigfont=true
|
||||
-Ddrm=true
|
||||
-Dglamor=false
|
||||
-Dxwayland_eglstream=false
|
||||
-Dxvfb=false
|
||||
-Dlibunwind=false
|
||||
-Dipv6=true
|
||||
-Dsha1=libcrypto
|
||||
-Ddefault_font_path=$TERMUX_PREFIX/share/fonts
|
||||
"
|
||||
|
||||
# Remove files conflicting with xorg-server:
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
lib/xorg/protocol.txt
|
||||
share/X11/xkb/compiled
|
||||
share/man/man1/Xserver.1
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export PATH="$TERMUX_PREFIX/opt/libwayland/cross/bin:$PATH"
|
||||
|
||||
CFLAGS+=" -fcommon -fPIC -DFNDELAY=O_NDELAY -Wno-int-to-pointer-cast"
|
||||
CPPFLAGS+=" -fcommon -fPIC -I${TERMUX_PREFIX}/include/libdrm"
|
||||
|
||||
if [ "${TERMUX_DEBUG_BUILD}" = "true" ]; then
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-debug"
|
||||
fi
|
||||
|
||||
# fixing automake version mismatch
|
||||
cd ${TERMUX_PKG_SRCDIR}
|
||||
files=`find . -name configure -o -name config.status -o -name Makefile.in`
|
||||
for file in $files; do rm $file; done
|
||||
unset files
|
||||
|
||||
#you will need xutils-dev package for xorg-macros installed
|
||||
autoreconf -if
|
||||
cd -
|
||||
LDFLAGS+=" -landroid-shmem"
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
+++ ./configure.ac
|
||||
@@ -2005,9 +2005,9 @@
|
||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
- if test "x$DRM" = xyes; then
|
||||
- XORG_DRIVER_MODESETTING=yes
|
||||
- fi
|
||||
+# if test "x$DRM" = xyes; then
|
||||
+# XORG_DRIVER_MODESETTING=yes
|
||||
+# fi
|
||||
|
||||
AC_SUBST([XORG_LIBS])
|
||||
AC_SUBST([XORG_SYS_LIBS])
|
|
@ -1,11 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -765,7 +765,7 @@
|
||||
LIBDRM="libdrm >= 2.4.89"
|
||||
LIBEGL="egl"
|
||||
LIBGBM="gbm >= 10.2.0"
|
||||
-LIBGL="gl >= 7.1.0"
|
||||
+LIBGL="gl >= 1.2"
|
||||
LIBXEXT="xext >= 1.0.99.4"
|
||||
LIBXFONT="xfont2 >= 2.0.0"
|
||||
LIBXI="xi >= 1.2.99.1"
|
|
@ -0,0 +1,33 @@
|
|||
+++ ./hw/xwayland/xwayland-shm.c
|
||||
@@ -129,7 +129,30 @@
|
||||
char *name;
|
||||
int fd;
|
||||
int ret;
|
||||
+#ifdef ANDROID
|
||||
+ long flags;
|
||||
|
||||
+ fd = open("/dev/ashmem", O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ return fd;
|
||||
+
|
||||
+ ret = ioctl(fd, /* ASHMEM_SET_SIZE */ _IOW(0x77, 3, size_t), size);
|
||||
+ if (ret < 0)
|
||||
+ goto err;
|
||||
+
|
||||
+ flags = fcntl(fd, F_GETFD);
|
||||
+ if (flags == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ return fd;
|
||||
+
|
||||
+err:
|
||||
+ close(fd);
|
||||
+ return ret;
|
||||
+#endif
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
fd = memfd_create("xwayland-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
if (fd >= 0) {
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
+++ ./hw/xfree86/Makefile.am 2018-01-28 10:03:56.740173910 +0200
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
|
||||
ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
|
||||
- $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods xkb \
|
||||
- fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
|
||||
+ $(DRI2_SUBDIR) fbdevhw shadowfb . $(VBE_SUBDIR) i2c \
|
||||
+ dixmods xkb exa $(XF86UTILS_SUBDIR) doc man \
|
||||
$(GLAMOR_EGL_SUBDIR) drivers
|
||||
|
||||
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
|
||||
@@ -45,8 +45,8 @@
|
||||
loader dixmods xkb dri dri2 exa modes \
|
||||
utils doc man glamor_egl drivers
|
||||
|
||||
+lib_LTLIBRARIES = libXFree86.la
|
||||
bin_PROGRAMS = Xorg
|
||||
-nodist_Xorg_SOURCES = sdksyms.c
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
|
||||
AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/parser \
|
||||
@@ -75,11 +75,35 @@
|
||||
$(top_builddir)/os/libos.la \
|
||||
$(top_builddir)/Xext/libXvidmode.la
|
||||
|
||||
-Xorg_LDADD = \
|
||||
- $(LOCAL_LIBS) \
|
||||
- $(XORG_SYS_LIBS) \
|
||||
- $(XSERVER_SYS_LIBS)
|
||||
-Xorg_DEPENDENCIES = $(LOCAL_LIBS)
|
||||
+LIBXFREE86_LIBS = \
|
||||
+ $(MAIN_LIB) \
|
||||
+ $(XSERVER_LIBS) \
|
||||
+ loader/libloader.la \
|
||||
+ common/libcommon.la \
|
||||
+ os-support/libxorgos.la \
|
||||
+ parser/libxf86config.la \
|
||||
+ dixmods/libdixmods.la \
|
||||
+ modes/libxf86modes.la \
|
||||
+ ramdac/libramdac.la \
|
||||
+ ddc/libddc.la \
|
||||
+ i2c/libi2c.la \
|
||||
+ $(XORG_LIBS) \
|
||||
+ xkb/libxorgxkb.la \
|
||||
+ fbdevhw/libfbdevhw.la \
|
||||
+ $(top_builddir)/Xext/libXvidmode.la \
|
||||
+ $(top_builddir)/fb/libfb.la \
|
||||
+ $(top_builddir)/miext/shadow/libshadow.la
|
||||
+
|
||||
+
|
||||
+libXFree86_la_LDFLAGS = $(Xorg_LDFLAGS) -module -avoid-version -Wl,--unresolved-symbols=report-all -rdynamic
|
||||
+nodist_libXFree86_la_SOURCES = sdksyms.c
|
||||
+libXFree86_la_SOURCES =
|
||||
+libXFree86_la_LIBADD = $(LIBXFREE86_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
|
||||
+libXFree86_la_CFLAGS = $(AM_CFLAGS)
|
||||
+libXFree86_la_DEPENDENCIES = $(LOCAL_LIBS)
|
||||
+
|
||||
+Xorg_LDADD = libXFree86.la
|
||||
+Xorg_SOURCES = $(top_srcdir)/dix/stubmain.c
|
||||
|
||||
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
|
||||
|
||||
+++ ./hw/xfree86/shadowfb/Makefile.am 2018-01-28 15:18:06.191501835 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
module_LTLIBRARIES = libshadowfb.la
|
||||
-libshadowfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libshadowfb_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
libshadowfb_la_SOURCES = sfbmodule.c shadowfb.c
|
||||
libshadowfb_la_LIBADD = $(PIXMAN_LIBS)
|
||||
|
||||
|
||||
+++ ./miext/shadow/Makefile.am 2018-01-28 15:24:22.836598681 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
sdk_HEADERS = shadow.h
|
||||
endif
|
||||
|
||||
+libshadow_la_LDFLAGS = -module -avoid-version -static
|
||||
libshadow_la_SOURCES = \
|
||||
c2p_core.h \
|
||||
shadow.c \
|
||||
|
||||
+++ ./hw/xfree86/fbdevhw/Makefile.am 2018-01-28 16:04:05.242414784 +0200
|
||||
@@ -1,17 +1,11 @@
|
||||
SUBDIRS = man
|
||||
|
||||
-module_LTLIBRARIES = libfbdevhw.la
|
||||
+noinst_LTLIBRARIES = libfbdevhw.la
|
||||
|
||||
-libfbdevhw_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libfbdevhw_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
-
|
||||
-if FBDEVHW
|
||||
libfbdevhw_la_SOURCES = fbdevhw.c
|
||||
-else
|
||||
-libfbdevhw_la_SOURCES = fbdevhwstub.c
|
||||
-endif
|
||||
|
||||
AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../i2c -I$(srcdir)/../modes -I$(srcdir)/../ddc -I$(srcdir)/../parser
|
||||
-
|
||||
AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
|
||||
|
||||
sdk_HEADERS = fbdevhw.h
|
||||
|
||||
+++ ./hw/xfree86/dixmods/Makefile.am 2018-01-30 00:09:07.250483502 +0200
|
||||
@@ -17,17 +17,17 @@
|
||||
-I$(top_srcdir)/miext/shadow \
|
||||
-I$(top_srcdir)/glx
|
||||
|
||||
-libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libfb_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
|
||||
libfb_la_SOURCES = fbmodule.c
|
||||
libfb_la_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
-libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libwfb_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
|
||||
libwfb_la_SOURCES = fbmodule.c
|
||||
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||
|
||||
-libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libglx_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS)
|
||||
if DRI2
|
||||
libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la
|
||||
@@ -37,7 +37,7 @@
|
||||
endif
|
||||
libglx_la_SOURCES = glxmodule.c
|
||||
|
||||
-libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
|
||||
+libshadow_la_LDFLAGS = -module -avoid-version -static $(LD_NO_UNDEFINED_FLAG)
|
||||
libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la
|
||||
if NO_UNDEFINED
|
||||
libshadow_la_LIBADD += libfb.la
|
||||
|
||||
+++ ./include/dix.h 2018-01-25 00:43:05.367766278 +0200
|
||||
@@ -307,7 +307,7 @@
|
||||
extern _X_EXPORT void
|
||||
SetVendorString(const char *string);
|
||||
|
||||
-int
|
||||
+_X_EXPORT int
|
||||
dix_main(int argc, char *argv[], char *envp[]);
|
||||
|
||||
/* events.c */
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- a/hw/xwayland/meson.build
|
||||
+++ b/hw/xwayland/meson.build
|
||||
@@ -31,7 +31,7 @@
|
||||
]
|
||||
|
||||
scanner_dep = dependency('wayland-scanner', native: true)
|
||||
-scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
|
||||
+scanner = find_program('wayland-scanner')
|
||||
|
||||
protocols_dep = dependency('wayland-protocols', version: wayland_protocols_req)
|
||||
protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')
|
|
@ -1,12 +0,0 @@
|
|||
diff -uNr xorg-server-1.20.1/include/site.h xorg-server-1.20.1.mod/include/site.h
|
||||
--- xorg-server-1.20.1/include/site.h 2018-08-07 19:31:05.000000000 +0300
|
||||
+++ xorg-server-1.20.1.mod/include/site.h 2018-10-08 21:07:16.824256995 +0300
|
||||
@@ -72,7 +72,7 @@
|
||||
* DO NOT CHANGE THESE VALUES OR THE DIX IMAKEFILE!
|
||||
*/
|
||||
#ifndef COMPILEDDEFAULTFONTPATH
|
||||
-#define COMPILEDDEFAULTFONTPATH "/usr/share/fonts/X11/misc/"
|
||||
+#define COMPILEDDEFAULTFONTPATH "@TERMUX_PREFIX@/share/fonts/X11/misc/"
|
||||
#endif
|
||||
|
||||
/*
|
|
@ -1,12 +0,0 @@
|
|||
diff -uNr xorg-server-1.20.1/os/connection.c xorg-server-1.20.1.mod/os/connection.c
|
||||
--- xorg-server-1.20.1/os/connection.c 2018-08-07 19:31:05.000000000 +0300
|
||||
+++ xorg-server-1.20.1.mod/os/connection.c 2018-10-08 21:07:16.837596523 +0300
|
||||
@@ -996,7 +996,7 @@
|
||||
XtransConnInfo ciptr;
|
||||
const char *display_env = getenv("DISPLAY");
|
||||
|
||||
- if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
|
||||
+ if (display_env && (strncmp(display_env, "@TERMUX_PREFIX@/tmp/launch", 11) == 0)) {
|
||||
/* Make the path the launchd socket if our DISPLAY is set right */
|
||||
strcpy(port, display_env);
|
||||
}
|
|
@ -2,13 +2,13 @@ diff -uNr xorg-server-1.20.1/xkb/ddxLoad.c xorg-server-1.20.1.mod/xkb/ddxLoad.c
|
|||
--- xorg-server-1.20.1/xkb/ddxLoad.c 2018-08-07 19:31:06.000000000 +0300
|
||||
+++ xorg-server-1.20.1.mod/xkb/ddxLoad.c 2018-10-08 21:07:16.844266287 +0300
|
||||
@@ -76,8 +76,8 @@
|
||||
}
|
||||
else
|
||||
#endif
|
||||
- if (strlen("/tmp/") < size) {
|
||||
- (void) strcpy(outdir, "/tmp/");
|
||||
+ if (strlen("@TERMUX_PREFIX@/tmp/") < size) {
|
||||
+ (void) strcpy(outdir, "@TERMUX_PREFIX@/tmp/");
|
||||
if (directory)
|
||||
r = snprintf(outdir, size, "%s%s", directory, pathsep);
|
||||
if (r < 0 || r >= size) {
|
||||
- assert(strlen("/tmp/") < size);
|
||||
- strcpy(outdir, "/tmp/");
|
||||
+ assert(strlen("@TERMUX_PREFIX@/tmp/") < size);
|
||||
+ strcpy(outdir, "@TERMUX_PREFIX@/tmp/");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,222 +0,0 @@
|
|||
diff -Naur ../xserver-1.20.5-orig/hw/xwayland/ashmem.h ./hw/xwayland/ashmem.h
|
||||
--- ../xserver-1.20.5-orig/hw/xwayland/ashmem.h 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ ./hw/xwayland/ashmem.h 2019-07-12 15:00:25.712211695 +0300
|
||||
@@ -0,0 +1,47 @@
|
||||
+/****************************************************************************
|
||||
+ ****************************************************************************
|
||||
+ ***
|
||||
+ *** This header was automatically generated from a Linux kernel header
|
||||
+ *** of the same name, to make information necessary for userspace to
|
||||
+ *** call into the kernel available to libc. It contains only constants,
|
||||
+ *** structures, and macros generated from the original header, and thus,
|
||||
+ *** contains no copyrightable information.
|
||||
+ ***
|
||||
+ ****************************************************************************
|
||||
+ ****************************************************************************/
|
||||
+#ifndef _LINUX_ASHMEM_H
|
||||
+#define _LINUX_ASHMEM_H
|
||||
+
|
||||
+#include <linux/limits.h>
|
||||
+#include <linux/ioctl.h>
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+#define ASHMEM_NAME_LEN 256
|
||||
+
|
||||
+#define ASHMEM_NAME_DEF "dev/ashmem"
|
||||
+
|
||||
+#define ASHMEM_NOT_PURGED 0
|
||||
+#define ASHMEM_WAS_PURGED 1
|
||||
+
|
||||
+#define ASHMEM_IS_UNPINNED 0
|
||||
+#define ASHMEM_IS_PINNED 1
|
||||
+
|
||||
+struct ashmem_pin {
|
||||
+ uint32_t offset;
|
||||
+ uint32_t len;
|
||||
+};
|
||||
+
|
||||
+#define __ASHMEMIOC 0x77
|
||||
+
|
||||
+#define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN])
|
||||
+#define ASHMEM_GET_NAME _IOR(__ASHMEMIOC, 2, char[ASHMEM_NAME_LEN])
|
||||
+#define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t)
|
||||
+#define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4)
|
||||
+#define ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned long)
|
||||
+#define ASHMEM_GET_PROT_MASK _IO(__ASHMEMIOC, 6)
|
||||
+#define ASHMEM_PIN _IOW(__ASHMEMIOC, 7, struct ashmem_pin)
|
||||
+#define ASHMEM_UNPIN _IOW(__ASHMEMIOC, 8, struct ashmem_pin)
|
||||
+#define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9)
|
||||
+#define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10)
|
||||
+
|
||||
+#endif
|
||||
diff -Naur ../xserver-1.20.5-orig/hw/xwayland/xwayland-cursor.c ./hw/xwayland/xwayland-cursor.c
|
||||
--- ../xserver-1.20.5-orig/hw/xwayland/xwayland-cursor.c 2019-07-12 15:14:26.885076932 +0300
|
||||
+++ ./hw/xwayland/xwayland-cursor.c 2019-07-12 14:57:25.217524468 +0300
|
||||
@@ -66,7 +66,8 @@
|
||||
PixmapPtr pixmap;
|
||||
|
||||
pixmap = xwl_shm_create_pixmap(screen, cursor->bits->width,
|
||||
- cursor->bits->height, 32, 0);
|
||||
+ cursor->bits->height, 32,
|
||||
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, pixmap);
|
||||
|
||||
return TRUE;
|
||||
diff -Naur ../xserver-1.20.5-orig/hw/xwayland/xwayland-glamor-gbm.c ./hw/xwayland/xwayland-glamor-gbm.c
|
||||
--- ../xserver-1.20.5-orig/hw/xwayland/xwayland-glamor-gbm.c 2019-07-12 15:14:26.885076932 +0300
|
||||
+++ ./hw/xwayland/xwayland-glamor-gbm.c 2019-07-12 14:57:38.836704786 +0300
|
||||
@@ -212,9 +212,9 @@
|
||||
PixmapPtr pixmap = NULL;
|
||||
|
||||
if (width > 0 && height > 0 && depth >= 15 &&
|
||||
- (hint == 0 ||
|
||||
- hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
|
||||
- hint == CREATE_PIXMAP_USAGE_SHARED)) {
|
||||
+ (hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
|
||||
+ hint == CREATE_PIXMAP_USAGE_SHARED ||
|
||||
+ (xwl_screen->rootless && hint == 0))) {
|
||||
uint32_t format = gbm_format_for_depth(depth);
|
||||
|
||||
#ifdef GBM_BO_WITH_MODIFIERS
|
||||
diff -Naur ../xserver-1.20.5-orig/hw/xwayland/xwayland-output.c ./hw/xwayland/xwayland-output.c
|
||||
--- ../xserver-1.20.5-orig/hw/xwayland/xwayland-output.c 2019-07-12 15:14:26.889075146 +0300
|
||||
+++ ./hw/xwayland/xwayland-output.c 2019-07-12 14:54:13.242596617 +0300
|
||||
@@ -171,6 +171,40 @@
|
||||
return 25.4 / DEFAULT_DPI;
|
||||
}
|
||||
|
||||
+static int
|
||||
+xwl_set_pixmap_visit_window(WindowPtr window, void *data)
|
||||
+{
|
||||
+ ScreenPtr screen = window->drawable.pScreen;
|
||||
+
|
||||
+ if (screen->GetWindowPixmap(window) == data) {
|
||||
+ screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen));
|
||||
+ return WT_WALKCHILDREN;
|
||||
+ }
|
||||
+
|
||||
+ return WT_DONTWALKCHILDREN;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
|
||||
+{
|
||||
+ ScreenPtr pScreen = xwl_screen->screen;
|
||||
+ WindowPtr pRoot = pScreen->root;
|
||||
+ PixmapPtr old_pixmap, new_pixmap;
|
||||
+
|
||||
+ old_pixmap = pScreen->GetScreenPixmap(pScreen);
|
||||
+ new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
|
||||
+ pScreen->rootDepth,
|
||||
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
|
||||
+ pScreen->SetScreenPixmap(new_pixmap);
|
||||
+
|
||||
+ if (old_pixmap) {
|
||||
+ TraverseTree(pRoot, xwl_set_pixmap_visit_window, old_pixmap);
|
||||
+ pScreen->DestroyPixmap(old_pixmap);
|
||||
+ }
|
||||
+
|
||||
+ pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
update_screen_size(struct xwl_output *xwl_output, int width, int height)
|
||||
{
|
||||
@@ -180,6 +214,9 @@
|
||||
if (xwl_screen->root_clip_mode == ROOT_CLIP_FULL)
|
||||
SetRootClip(xwl_screen->screen, ROOT_CLIP_NONE);
|
||||
|
||||
+ if (!xwl_screen->rootless && xwl_screen->screen->root)
|
||||
+ update_backing_pixmaps (xwl_screen, width, height);
|
||||
+
|
||||
xwl_screen->width = width;
|
||||
xwl_screen->height = height;
|
||||
xwl_screen->screen->width = width;
|
||||
diff -Naur ../xserver-1.20.5-orig/hw/xwayland/xwayland-shm.c ./hw/xwayland/xwayland-shm.c
|
||||
--- ../xserver-1.20.5-orig/hw/xwayland/xwayland-shm.c 2019-07-12 15:14:26.889075146 +0300
|
||||
+++ ./hw/xwayland/xwayland-shm.c 2019-07-12 15:28:09.124589333 +0300
|
||||
@@ -40,12 +40,17 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include "ashmem.h"
|
||||
+#endif
|
||||
+
|
||||
struct xwl_pixmap {
|
||||
struct wl_buffer *buffer;
|
||||
void *data;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
+#ifndef __ANDROID__
|
||||
#ifndef HAVE_MKOSTEMP
|
||||
static int
|
||||
set_cloexec_or_close(int fd)
|
||||
@@ -172,6 +177,37 @@
|
||||
return fd;
|
||||
}
|
||||
|
||||
+#else // __ANDROID__
|
||||
+
|
||||
+static int
|
||||
+os_create_anonymous_file(off_t size) {
|
||||
+ int fd, ret;
|
||||
+ long flags;
|
||||
+
|
||||
+ fd = open("/dev/ashmem", O_RDWR);
|
||||
+ if (fd < 0)
|
||||
+ return fd;
|
||||
+
|
||||
+ ret = ioctl(fd, ASHMEM_SET_SIZE, size);
|
||||
+ if (ret < 0)
|
||||
+ goto err;
|
||||
+
|
||||
+ flags = fcntl(fd, F_GETFD);
|
||||
+ if (flags == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ return fd;
|
||||
+
|
||||
+err:
|
||||
+ close(fd);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#endif // __ANDROID__
|
||||
+
|
||||
static uint32_t
|
||||
shm_format_for_depth(int depth)
|
||||
{
|
||||
@@ -202,6 +238,7 @@
|
||||
int fd;
|
||||
|
||||
if (hint == CREATE_PIXMAP_USAGE_GLYPH_PICTURE ||
|
||||
+ (!xwl_screen->rootless && hint != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) ||
|
||||
(width == 0 && height == 0) || depth < 15)
|
||||
return fbCreatePixmap(screen, width, height, depth, hint);
|
||||
|
||||
--- ./miext/sync/meson.build.orig 2019-07-21 03:56:18.960672711 +0300
|
||||
+++ ./miext/sync/meson.build 2019-07-21 04:02:55.926796439 +0300
|
||||
@@ -1,6 +1,7 @@
|
||||
srcs_miext_sync = [
|
||||
'misync.c',
|
||||
'misyncfd.c',
|
||||
+ 'misyncshm.c',
|
||||
]
|
||||
|
||||
hdrs_miext_sync = [
|
||||
@@ -10,10 +11,6 @@
|
||||
'misyncstr.h',
|
||||
]
|
||||
|
||||
-if build_dri3
|
||||
- srcs_miext_sync += 'misyncshm.c'
|
||||
-endif
|
||||
-
|
||||
libxserver_miext_sync = static_library('libxserver_miext_sync',
|
||||
srcs_miext_sync,
|
||||
include_directories: inc,
|
Loading…
Reference in New Issue