[arch-commits] Commit in xorg-server/trunk (2 files)
Laurent Carlier
lcarlier at archlinux.org
Fri Jul 15 10:22:10 UTC 2016
Date: Friday, July 15, 2016 @ 10:22:10
Author: lcarlier
Revision: 271891
upgpkg: xorg-server 1.18.3-3
Add a patch to fix broken cursor with some steam games (the cave, shadow warrior, ...)
Added:
xorg-server/trunk/xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch
Modified:
xorg-server/trunk/PKGBUILD
------------------------------------------------------------------+
PKGBUILD | 10 ++
xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch | 34 ++++++++++
2 files changed, 41 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-07-15 10:18:50 UTC (rev 271890)
+++ PKGBUILD 2016-07-15 10:22:10 UTC (rev 271891)
@@ -5,7 +5,7 @@
pkgbase=xorg-server
pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel')
pkgver=1.18.3
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
license=('custom')
groups=('xorg')
@@ -20,7 +20,8 @@
source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2{,.sig}
xvfb-run
xvfb-run.1
- call-eglBindAPI-after-eglInitialize.patch)
+ call-eglBindAPI-after-eglInitialize.patch
+ xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch)
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
'C383B778255613DFDB409D91DB221A6900000011'
'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3')
@@ -28,12 +29,15 @@
'SKIP'
'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
'2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
- '45fdc2a1241d458756c41a93c01846e04cc75f3c75f81f48b61533d08280918d')
+ '45fdc2a1241d458756c41a93c01846e04cc75f3c75f81f48b61533d08280918d'
+ 'ecb0b1f73342e8c3de1563efcc812ac0235e2994d0343b392c1f51920510aa18')
prepare() {
cd "${pkgbase}-${pkgver}"
patch -Np1 -i ../call-eglBindAPI-after-eglInitialize.patch
+ # fix broken cursor in games with mesa drivers
+ patch -Np1 -i ../xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch
}
build() {
Added: xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch
===================================================================
--- xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch (rev 0)
+++ xserver-dix-Work-around-non-premultiplied-ARGB-cursor-data.patch 2016-07-15 10:22:10 UTC (rev 271891)
@@ -0,0 +1,34 @@
+diff --git a/dix/cursor.c b/dix/cursor.c
+index e459456..25d6767 100644
+--- a/dix/cursor.c
++++ b/dix/cursor.c
+@@ -288,6 +288,29 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
+ goto error;
+
+ *ppCurs = pCurs;
++
++ if (argb) {
++ size_t i, size = bits->width * bits->height;
++
++ for (i = 0; i < size; i++) {
++ if ((argb[i] & 0xff000000) == 0 && (argb[i] & 0xffffff) != 0) {
++ /* ARGB data doesn't seem pre-multiplied, fix it */
++ for (i = 0; i < size; i++) {
++ CARD32 a, ar, ag, ab;
++
++ a = argb[i] >> 24;
++ ar = a * ((argb[i] >> 16) & 0xff) / 0xff;
++ ag = a * ((argb[i] >> 8) & 0xff) / 0xff;
++ ab = a * (argb[i] & 0xff) / 0xff;
++
++ argb[i] = a << 24 | ar << 16 | ag << 8 | ab;
++ }
++
++ break;
++ }
++ }
++ }
++
+ return Success;
+
+ error:
More information about the arch-commits
mailing list