pixman: Branch 'master'

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Sat Jun 16 20:12:43 PDT 2007


 pixman/pixman-pict.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)

New commits:
diff-tree 9deaaae3f61f1701b022fe7daa1823a99fda7d00 (from e0a501d9b7e5c4ca07115552a16c4c4953ec5702)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Sat Jun 16 23:08:53 2007 -0400

    Use the general code in some cases even when a fast path is available
    
    If src or mask are repeating 1x1 images and srcRepeat or
    maskRepeat are still TRUE, it means the fast path we
    selected does not actually handle repeating images.
    So rather than call the "fast path" with a zillion
    1x1 requests, we just use the general code (which does
    do something sensible with 1x1 repeating images).

diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c
index 3986d7d..afe44cc 100644
--- a/pixman/pixman-pict.c
+++ b/pixman/pixman-pict.c
@@ -1701,6 +1701,24 @@ pixman_image_composite (pixman_op_t     
 	break;
     }
 
+    if ((srcRepeat			&&
+	 pSrc->bits.width == 1		&&
+	 pSrc->bits.height == 1)	||
+	(maskRepeat			&&
+	 pMask->bits.width == 1		&&
+	 pMask->bits.height == 1))
+    {
+	/* If src or mask are repeating 1x1 images and srcRepeat or
+	 * maskRepeat are still TRUE, it means the fast path we
+	 * selected does not actually handle repeating images.
+	 *
+	 * So rather than call the "fast path" with a zillion
+	 * 1x1 requests, we just use the general code (which does
+	 * do something sensible with 1x1 repeating images).
+	 */
+	func = NULL;
+    }
+    
     if (!func) {
 	func = pixman_image_composite_rect;
 


More information about the xorg-commit mailing list