summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2010-04-12 08:53:11 +0300
committerMartin-Éric Racine <q-funk@iki.fi>2010-04-12 12:53:41 +0300
commita4b8389e50ea92fe361d96da6fe1c2d7caf39a02 (patch)
tree9d1ade6d34b28d350e35fb932b03e25d2f5adc59
parent46679d0220c8d34bdd46433bffc490c971783ab9 (diff)
lx_exa: bail earlier (in CheckComposite) for non-alpha-only masks.
We should have all the information at CheckComposite already, so don't waste time migrating pixmaps for this case, only to fail in PrepareComposite. Currently more importantly this workarounds EXA fallback failure in xserver-1.7+ for this situation, which resulted in many desktop icons not getting rendered; bug #27243
-rw-r--r--src/lx_exa.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lx_exa.c b/src/lx_exa.c
index 31f9b0e..b267cc0 100644
--- a/src/lx_exa.c
+++ b/src/lx_exa.c
@@ -582,6 +582,12 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst)
if (pSrc->format == PICT_a8 || pDst->format == PICT_a8)
return FALSE;
+ if (pMsk && op != PictOpClear) {
+ /* We can only do masks with a 8bpp or a 4bpp mask */
+ if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4)
+ return FALSE;
+ }
+
return TRUE;
}
@@ -638,11 +644,6 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk,
struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2];
int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1;
- /* We can only do masks with a 8bpp or a 4bpp mask */
-
- if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4)
- return FALSE;
-
/* Direction 0 indicates src->dst, 1 indiates dst->src */
if (((direction == 0) && (pxSrc->drawable.bitsPerPixel < 16)) ||