[PATCH] exa: Unset and restore per alpha in exaTryMagicTwoPassCompositeHelper

jakob at vmware.com jakob at vmware.com
Thu Oct 15 16:29:23 PDT 2009


From: Zack Rusin <zackr at vmware.com>

This fixes the component alpha fallback in exa. I'm not sure which branches
this should go into. Also before committing this patch make sure that
we get a Tested-by by somebody with a radeon card as this turns on new and
wonderful paths not tested in the drivers. It works just fine on st/xorg.

Signed-off-by: Zack Rusin <zackr at vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob at vmware.com>

---
 exa/exa_render.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/exa/exa_render.c b/exa/exa_render.c
index bbc2ce7..aa9ca87 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -857,6 +857,8 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
 				  CARD16 height)
 {
     ExaScreenPriv (pDst->pDrawable->pScreen);
+    int oldComponentAlpha = pMask->componentAlpha;
+    pMask->componentAlpha = 0;
 
     assert(op == PictOpOver);
 
@@ -865,6 +867,7 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
 					   pDst) ||
 	 !(*pExaScr->info->CheckComposite)(PictOpAdd, pSrc, pMask, pDst)))
     {
+	pMask->componentAlpha = oldComponentAlpha;
 	return -1;
     }
 
@@ -880,6 +883,7 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
     exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask,
 		 xDst, yDst, width, height);
 
+    pMask->componentAlpha = oldComponentAlpha;
     return 1;
 }
 
-- 
1.6.0.4



More information about the xorg-devel mailing list