aboutsummaryrefslogtreecommitdiffstats
path: root/main/xorg-server
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:51:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:51:34 +0000
commite37f33afdf5431f85739012afb550e91452266bf (patch)
tree40d8f4ac9f858d7149364c243ac7761b032fa2dc /main/xorg-server
parentc68fbae3fa433dd8f867901ec1c8c9f092509836 (diff)
downloadaports-e37f33afdf5431f85739012afb550e91452266bf.tar.bz2
aports-e37f33afdf5431f85739012afb550e91452266bf.tar.xz
main/xorg-server: enable glamor. fix license
Diffstat (limited to 'main/xorg-server')
-rw-r--r--main/xorg-server/APKBUILD16
-rw-r--r--main/xorg-server/glamor-upstream-fix.patch178
2 files changed, 190 insertions, 4 deletions
diff --git a/main/xorg-server/APKBUILD b/main/xorg-server/APKBUILD
index a22a82faa1..51a0b5314c 100644
--- a/main/xorg-server/APKBUILD
+++ b/main/xorg-server/APKBUILD
@@ -1,12 +1,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xorg-server
pkgver=1.16.0
-pkgrel=0
+pkgrel=1
pkgdesc="X.Org X servers"
url="http://xorg.freedesktop.org"
arch="all"
-license="custom"
-subpackages="$pkgname-dev $pkgname-doc xfbdev xvfb $pkgname-xephyr $pkgname-xnest"
+license="MIT"
+options="suid"
+subpackages="$pkgname-dev $pkgname-doc xfbdev xvfb $pkgname-xephyr
+ $pkgname-xnest"
depends="
font-misc-misc
font-cursor-misc
@@ -25,6 +27,7 @@ depends_dev="
glproto
inputproto
kbproto
+ libepoxy-dev
libpciaccess-dev
mesa-dev
pixman-dev
@@ -73,6 +76,7 @@ source="http://xorg.freedesktop.org/releases/individual/xserver/$pkgname-$pkgver
autoconfig-nvidia.patch
autoconfig-sis.patch
fix-musl-arm.patch
+ glamor-upstream-fix.patch
20-modules.conf
"
@@ -112,9 +116,10 @@ build() {
--enable-aiglx \
--enable-composite \
--enable-config-udev \
- --enable-glx-tls \
--enable-dri \
--enable-dri2 \
+ --enable-glamor \
+ --enable-glx-tls \
--enable-ipv6 \
--enable-xfbdev \
--enable-kdrive \
@@ -179,14 +184,17 @@ md5sums="8a9ff6ee9907360f09b5bdabb8089502 xorg-server-1.16.0.tar.bz2
ea4852dedbb89550f6bc113ca66348a2 autoconfig-nvidia.patch
825ca99ea9348c66abdf2c479e0af485 autoconfig-sis.patch
043cbe8fc14729ae1e776788ae7593bf fix-musl-arm.patch
+e69a0e02135db7c210b266623141435d glamor-upstream-fix.patch
6c2ce6a968b92661494fc27a6364317e 20-modules.conf"
sha256sums="38330a03c5f7a38745a3f9816cf069db5b8844eebb358fd39dbabf61f32cd06b xorg-server-1.16.0.tar.bz2
66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162 autoconfig-nvidia.patch
7d5d36dd152eb0fab277a4aeba0a08ad77049e591a0dea92f565a4b62f0d0a50 autoconfig-sis.patch
b210a93b4d6128c0963ade3458925ff293e1c68ac20a15964357fd401f7161e0 fix-musl-arm.patch
+fbd898f0e867c77c9bf918fd2e7956c7776ecb3cc3634c61290fb03513b47987 glamor-upstream-fix.patch
3c545888d585cf9931e19f85e758dd9b3bae0e9a117488f2024ab48acf67f831 20-modules.conf"
sha512sums="eab298e3728aa79ff2ba3f5c12637c4db0f9bbca49ed00b673b2bfedf605f33a69d8eb946bed98e3d28afd9bfaf62e21ce2e8606d84cae9906506d90c26f1662 xorg-server-1.16.0.tar.bz2
4dcaa60fbfc61636e7220a24a72bba19984a6dc752061cb40b1bd566c0e614d08927b6c223ffaaaa05636765fddacdc3113fde55d25fd09cd0c786ff44f51447 autoconfig-nvidia.patch
30a78f4278edd535c45ee3f80933427cb029a13abaa4b041f816515fdd8f64f00b9c6aef50d4eba2aaf0d4f333e730399864fd97fa18891273601c77a6637200 autoconfig-sis.patch
b799e757a22a61ac283adbd7a8df1ad4eccce0bb6cac38a0c962ba8438bba3cf6637a65bb64859e7b32399fca672283a49960207e186c271ba574580de360d09 fix-musl-arm.patch
+869939c9b6b03c64128090060a987487aba7702c7198fa32117eca1d69e2c23ebcd9c647af39f04e97214e2a4a6040c32dd5d59ff73086ab936908a6175350c0 glamor-upstream-fix.patch
ac3e0c191c3b8fda1a78488d326b1ce01836998b6640c228b8f5f6f80be416d7534dab086bb0fbec60727c6c8afc1ef2dfd3072bf571975724943997dc7c2b73 20-modules.conf"
diff --git a/main/xorg-server/glamor-upstream-fix.patch b/main/xorg-server/glamor-upstream-fix.patch
new file mode 100644
index 0000000000..89dd4d0176
--- /dev/null
+++ b/main/xorg-server/glamor-upstream-fix.patch
@@ -0,0 +1,178 @@
+From 3c0431b8911241552a15a43e4279c50658b50a18 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 16 Jul 2014 23:03:23 +0000
+Subject: glamor: Fix temp picture coordinates in glamor_composite_clipped_region
+
+To understand this patch, let's start at the protocol interface where
+the relationship between the coordinate spaces is documented:
+
+ static Bool
+ _glamor_composite(CARD8 op,
+ PicturePtr source,
+ PicturePtr mask,
+ PicturePtr dest,
+ INT16 x_source,
+ INT16 y_source,
+ INT16 x_mask,
+ INT16 y_mask,
+ INT16 x_dest, INT16 y_dest,
+ CARD16 width, CARD16 height, Bool fallback)
+
+The coordinates are passed to this function directly off the wire and
+are all relative to their respective drawables. For Windows, this means
+that they are relative to the upper left corner of the window, in
+whatever pixmap that window is getting drawn to.
+
+_glamor_composite calls miComputeCompositeRegion to construct a clipped
+region to actually render to. In reality, miComputeCompositeRegion clips
+only to the destination these days; source clip region based clipping
+would have to respect the transform, which isn't really possible. The
+returned region is relative to the screen in which dest lives; offset by
+dest->drawable.x and dest->drawable.y.
+
+What is important to realize here is that, because of clipping, the
+composite region may not have the same position within the destination
+drawable as x_dest, y_dest. The protocol coordinates now exist solely to
+'pin' the three objects together.
+
+ extents->x1,y1 Screen origin of clipped operation
+ width,height Extents of the clipped operation
+ x_dest,y_dest Unclipped destination-relative operation coordinate
+ x_source,y_source Unclipped source-relative operation coordinate
+ x_mask,y_mask Unclipped mask-relative operation coordinate
+
+One thing we want to know is what the offset is from the original
+operation origin to the clipped origin
+
+ Destination drawable relative coordinates of the clipped operation:
+
+ x_dest_clipped = extents->x1 - dest->drawable.x
+ y_dest_clipped = extents->y1 - dest->drawable.y
+
+ Offset from the original operation origin:
+
+ x_off_clipped = x_dest_clipped - x_dest
+ y_off_clipped = y_dest_clipped - y_dest
+
+ Source drawable relative coordinates of the clipped operation:
+
+ x_source_clipped = x_source + x_off_clipped;
+ y_source_clipped = y_source + y_off_clipped;
+
+ Mask drawable relative coordinates of the clipped operation:
+
+ x_mask_clipped = x_source + x_off_clipped;
+ y_mask_clipped = y_source + y_off_clipped;
+
+This is where the original code fails -- it doesn't subtract the
+destination drawable location when computing the distance that the
+operation has been moved by clipping. Here's what it does when
+constructing a temporary source picture:
+
+ temp_src =
+ glamor_convert_gradient_picture(screen, source,
+ extent->x1 + x_source - x_dest,
+ extent->y1 + y_source - y_dest,
+ width, height);
+ ...
+ x_temp_src = -extent->x1 + x_dest;
+ y_temp_src = -extent->y1 + y_dest;
+
+glamor_convert_gradient_picture needs source drawable relative
+coordinates, but that is not what it's getting; it's getting
+screen-relative coordinates for the destination, adjusted by the
+distance between the provided source and destination operation
+coordinates. We want x_source_clipped and y_source_clipped:
+
+ x_source_clipped = x_source + x_off_clipped
+ = x_source + x_dest_clipped - x_dest
+ = x_source + extents->x1 - dest->drawable.x - x_dest
+
+x_temp_src/y_temp_src are supposed to be the coordinates of the original
+operation translated to the temporary picture:
+
+ x_temp_src = x_source - x_source_clipped;
+ y_temp_src = y_source - y_source_clipped;
+
+Note that x_source_clipped/y_source_clipped will never be less than
+x_source/y_source because all we're doing is clipping. This means that
+x_temp_src/y_temp_src will always be non-positive; the original source
+coordinate can never be strictly *inside* the temporary image or we
+could have made the temporary image smaller.
+
+ x_temp_src = x_source - x_source_clipped
+ = x_source - (x_source + x_off_clipped)
+ = -x_off_clipped
+ = x_dest - x_dest_clipped
+ = x_dest - (extents->x1 - dest->drawable.x)
+
+Again, this is off by the destination origin within the screen
+coordinate space.
+
+The code should look like:
+
+ temp_src =
+ glamor_convert_gradient_picture(screen, source,
+ extent->x1 + x_source - x_dest - dest->pDrawable->x,
+ extent->y1 + y_source - y_dest - dest->pDrawable->y,
+ width, height);
+
+ x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x;
+ y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y;
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Markus Wick <markus@selfnet.de>
+(cherry picked from commit 55f5bfb578e934319d1308cbb56c900c5ac7cfa7)
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+---
+diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
+index 14ab738..e5d5d2c 100644
+--- a/glamor/glamor_render.c
++++ b/glamor/glamor_render.c
+@@ -1450,8 +1450,8 @@ glamor_composite_clipped_region(CARD8 op,
+ || source_pixmap->drawable.height != height)))) {
+ temp_src =
+ glamor_convert_gradient_picture(screen, source,
+- extent->x1 + x_source - x_dest,
+- extent->y1 + y_source - y_dest,
++ extent->x1 + x_source - x_dest - dest->pDrawable->x,
++ extent->y1 + y_source - y_dest - dest->pDrawable->y,
+ width, height);
+ if (!temp_src) {
+ temp_src = source;
+@@ -1459,8 +1459,8 @@ glamor_composite_clipped_region(CARD8 op,
+ }
+ temp_src_priv =
+ glamor_get_pixmap_private((PixmapPtr) (temp_src->pDrawable));
+- x_temp_src = -extent->x1 + x_dest;
+- y_temp_src = -extent->y1 + y_dest;
++ x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x;
++ y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y;
+ }
+
+ if (mask
+@@ -1474,8 +1474,8 @@ glamor_composite_clipped_region(CARD8 op,
+ * to do reduce one convertion. */
+ temp_mask =
+ glamor_convert_gradient_picture(screen, mask,
+- extent->x1 + x_mask - x_dest,
+- extent->y1 + y_mask - y_dest,
++ extent->x1 + x_mask - x_dest - dest->pDrawable->x,
++ extent->y1 + y_mask - y_dest - dest->pDrawable->y,
+ width, height);
+ if (!temp_mask) {
+ temp_mask = mask;
+@@ -1483,8 +1483,8 @@ glamor_composite_clipped_region(CARD8 op,
+ }
+ temp_mask_priv =
+ glamor_get_pixmap_private((PixmapPtr) (temp_mask->pDrawable));
+- x_temp_mask = -extent->x1 + x_dest;
+- y_temp_mask = -extent->y1 + y_dest;
++ x_temp_mask = -extent->x1 + x_dest + dest->pDrawable->x;
++ y_temp_mask = -extent->y1 + y_dest + dest->pDrawable->y;
+ }
+ /* Do two-pass PictOpOver componentAlpha, until we enable
+ * dual source color blending.
+--
+cgit v0.9.0.2-2-gbebe
+