xserver: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Thu May 21 15:26:10 PDT 2009


 render/mipict.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit a8bd1e1f96d8e5380972a7dce8d9940cd912aa09
Author: Søren Sandmann Pedersen <ssp at l3000.localdomain>
Date:   Thu May 21 18:21:28 2009 -0400

    Fix alpha map computation in miComputeCompositeRegion()
    
    According to the RENDER spec, the origin of the alpha map is
    interpreted relative to the origin of the drawable of the image, not
    the origin of drawable of the alpha map.
    
    The only use of alpha maps I have been able to find is in Qt and they
    don't use a non-zero alpha origin.

diff --git a/render/mipict.c b/render/mipict.c
index 777f111..fe1b8da 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -459,8 +459,8 @@ miComputeCompositeRegion (RegionPtr	pRegion,
     if (pSrc->alphaMap)
     {
 	if (!miClipPictureSrc (pRegion, pSrc->alphaMap,
-			       xDst - (xSrc + pSrc->alphaOrigin.x),
-			       yDst - (ySrc + pSrc->alphaOrigin.y)))
+			       xDst - (xSrc - pSrc->alphaOrigin.x),
+			       yDst - (ySrc - pSrc->alphaOrigin.y)))
 	{
 	    pixman_region_fini (pRegion);
 	    return FALSE;
@@ -477,8 +477,8 @@ miComputeCompositeRegion (RegionPtr	pRegion,
 	if (pMask->alphaMap)
 	{
 	    if (!miClipPictureSrc (pRegion, pMask->alphaMap,
-				   xDst - (xMask + pMask->alphaOrigin.x),
-				   yDst - (yMask + pMask->alphaOrigin.y)))
+				   xDst - (xMask - pMask->alphaOrigin.x),
+				   yDst - (yMask - pMask->alphaOrigin.y)))
 	    {
 		pixman_region_fini (pRegion);
 		return FALSE;


More information about the xorg-commit mailing list