[cairo-commit] 3 commits - pixman/src test/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Apr 12 11:44:44 PDT 2007


 pixman/src/fbcompose.c |  250 ++++++++++++++++++++++++++++++-------------------
 test/Makefile.am       |   10 +
 2 files changed, 160 insertions(+), 100 deletions(-)

New commits:
diff-tree e391d3eaee65d65f267f86d1ef1e1fd8898e6556 (from d3c7942fb271fe8d1df7ca3205b41601abdcb5c8)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Apr 12 14:42:41 2007 -0400

    [test] Disable text-glyph-range that was crashing
    
    Disabled tests are defined in DISABLED_TESTS.  This has the benefit
    that they will still be buildable and be shipped.  Just not run by
    default.

diff --git a/test/Makefile.am b/test/Makefile.am
index 4effd77..3056969 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -99,7 +99,6 @@ text-antialias-gray		\
 text-antialias-none		\
 text-antialias-subpixel		\
 text-cache-crash		\
-text-glyph-range		\
 text-pattern			\
 text-rotate			\
 text-zero-len			\
@@ -114,6 +113,10 @@ rel-path                        \
 push-group			\
 zero-alpha
 
+DISABLED_TESTS =		\
+text-glyph-range		\
+extend-reflect
+
 # Then we have a collection of tests that are only run if certain
 # features are compiled into cairo
 if HAVE_PTHREAD
@@ -415,8 +418,7 @@ long-lines			\
 self-intersecting		\
 surface-pattern			\
 surface-pattern-scale-down	\
-surface-pattern-scale-up	\
-text-glyph-range
+surface-pattern-scale-up
 
 # Any test that doesn't generate a log file goes here
 NOLOG_TESTS =			\
@@ -502,7 +504,7 @@ svg2pdf_LDADD  = $(LDADD) $(LIBRSVG_LIBS
 endif
 endif
 
-EXTRA_PROGRAMS += $(TESTS) $(SUPPORT_PROGS)
+EXTRA_PROGRAMS += $(TESTS) $(DISABLED_TESTS) $(SUPPORT_PROGS)
 
 # Do a funny transition of CAIRO_TEST_TARGET through TARGETS such that
 # one can limit tested targets both through CAIRO_TEST_TARGET env var
diff-tree d3c7942fb271fe8d1df7ca3205b41601abdcb5c8 (from e3b3d22999a130f7017e8e20a432a0d8a7f48f3b)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Apr 12 14:22:02 2007 -0400

    [pixman] Mark some small functions that are called per-pixel inline
    
    These uses were introduced in the previous commit.

diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index 4fcf699..47fb017 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -2058,7 +2058,7 @@ static CombineFuncU fbCombineFuncU[] = {
     fbCombineConjointXorU,
 };
 
-static FASTCALL void
+static inline void
 fbCombineMaskC (CARD32 *src, CARD32 *mask)
 {
     CARD32 a = *mask;
@@ -2089,7 +2089,7 @@ fbCombineMaskC (CARD32 *src, CARD32 *mas
     *mask = a;
 }
 
-static FASTCALL void
+static inline void
 fbCombineMaskValueC (CARD32 *src, const CARD32 *mask)
 {
     CARD32 a = *mask;
@@ -2109,7 +2109,7 @@ fbCombineMaskValueC (CARD32 *src, const 
     *src = x;
 }
 
-static FASTCALL void
+static inline void
 fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask)
 {
     CARD32 a = *mask;
diff-tree e3b3d22999a130f7017e8e20a432a0d8a7f48f3b (from c8d2d1e8764c7ba754e46a3af68af2b4460d2e04)
Author: David Reveman <davidr at novell.com>
Date:   Thu Apr 12 14:14:12 2007 -0400

    [pixman] Fix fbcompose.c that was broken for some composite operations (#5777)

diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index d93df45..4fcf699 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -2059,88 +2059,79 @@ static CombineFuncU fbCombineFuncU[] = {
 };
 
 static FASTCALL void
-fbCombineMaskC (CARD32 *src, CARD32 *mask, int width)
+fbCombineMaskC (CARD32 *src, CARD32 *mask)
 {
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 a = mask[i];
-
-        CARD32	x;
-        CARD16	xa;
+    CARD32 a = *mask;
 
-        if (!a)
-        {
-            src[i] = 0;
-            continue;
-        }
+    CARD32	x;
+    CARD16	xa;
 
-        x = src[i];
-        if (a == 0xffffffff)
-        {
-            x = x >> 24;
-            x |= x << 8;
-            x |= x << 16;
-            mask[i] = x;
-            continue;
-        }
+    if (!a)
+    {
+	*src = 0;
+	return;
+    }
 
-        xa = x >> 24;
-        FbByteMulC(x, a);
-        src[i] = x;
-        FbByteMul(a, xa);
-        mask[i] = a;
+    x = *src;
+    if (a == 0xffffffff)
+    {
+	x = x >> 24;
+	x |= x << 8;
+	x |= x << 16;
+	*mask = x;
+	return;
     }
+
+    xa = x >> 24;
+    FbByteMulC(x, a);
+    *src = x;
+    FbByteMul(a, xa);
+    *mask = a;
 }
 
 static FASTCALL void
-fbCombineMaskValueC (CARD32 *src, const CARD32 *mask, int width)
+fbCombineMaskValueC (CARD32 *src, const CARD32 *mask)
 {
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 a = mask[i];
-        CARD32	x;
+    CARD32 a = *mask;
+    CARD32	x;
 
-        if (!a)
-        {
-            src[i] = 0;
-            continue;
-        }
+    if (!a)
+    {
+	*src = 0;
+	return;
+    }
 
-        if (a == 0xffffffff)
-            continue;
+    if (a == 0xffffffff)
+	return;
 
-        x = src[i];
-        FbByteMulC(x, a);
-        src[i] = x;
-    }
+    x = *src;
+    FbByteMulC(x, a);
+    *src = x;
 }
 
 static FASTCALL void
-fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width)
+fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask)
 {
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 a = mask[i];
-        CARD32	x;
-
-        if (!a)
-            continue;
+    CARD32 a = *mask;
+    CARD32	x;
 
-        x = src[i] >> 24;
-        if (x == 0xff)
-            continue;
-        if (a == 0xffffffff)
-        {
-            x = x >> 24;
-            x |= x << 8;
-            x |= x << 16;
-            mask[i] = x;
-            continue;
-        }
+    if (!a)
+	return;
 
-        FbByteMul(a, x);
-        mask[i] = a;
+    x = *src >> 24;
+    if (x == 0xff)
+	return;
+    if (a == 0xffffffff)
+    {
+	x = x >> 24;
+	x |= x << 8;
+	x |= x << 16;
+	*mask = x;
+	return;
     }
+
+    FbByteMul(a, x);
+    *mask = a;
 }
 
 static FASTCALL void
@@ -2152,19 +2143,31 @@ fbCombineClearC (CARD32 *dest, CARD32 *s
 static FASTCALL void
 fbCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
-    fbCombineMaskValueC(src, mask, width);
-    memcpy(dest, src, width*sizeof(CARD32));
+    int i;
+
+    for (i = 0; i < width; ++i) {
+	CARD32 s = src[i];
+	CARD32 m = mask[i];
+
+	fbCombineMaskValueC (&s, &m);
+
+	*dest = s;
+    }
 }
 
 static FASTCALL void
 fbCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
-        CARD32  s = src[i];
-        CARD32  a = ~mask[i];
+	CARD32 s = src[i];
+	CARD32 m = mask[i];
+	CARD32 a;
+
+	fbCombineMaskC (&s, &m);
 
+	a = ~m;
         if (a != 0xffffffff)
         {
             if (a)
@@ -2182,7 +2185,7 @@ static FASTCALL void
 fbCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskValueC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 d = dest[i];
         CARD32 a = ~d >> 24;
@@ -2190,6 +2193,10 @@ fbCombineOverReverseC (CARD32 *dest, CAR
         if (a)
         {
             CARD32 s = src[i];
+	    CARD32 m = mask[i];
+
+	    fbCombineMaskValueC (&s, &m);
+
             if (a != 0xff)
             {
                 FbByteMulAdd(s, a, d);
@@ -2203,14 +2210,17 @@ static FASTCALL void
 fbCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskValueC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 d = dest[i];
         CARD16 a = d >> 24;
         CARD32 s = 0;
         if (a)
         {
-            s = src[i];
+	    CARD32 m = mask[i];
+
+	    s = src[i];
+	    fbCombineMaskValueC (&s, &m);
             if (a != 0xff)
             {
                 FbByteMul(s, a);
@@ -2224,10 +2234,15 @@ static FASTCALL void
 fbCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskAlphaC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
-        CARD32 a = mask[i];
+        CARD32 s = src[i];
+        CARD32 m = mask[i];
+        CARD32 a;
 
+	fbCombineMaskAlphaC (&s, &m);
+
+	a = m;
         if (a != 0xffffffff)
         {
             CARD32 d = 0;
@@ -2245,14 +2260,18 @@ static FASTCALL void
 fbCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskValueC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 d = dest[i];
         CARD16 a = ~d >> 24;
         CARD32 s = 0;
         if (a)
         {
-            s = src[i];
+	    CARD32 m = mask[i];
+
+	    s = src[i];
+	    fbCombineMaskValueC (&s, &m);
+
             if (a != 0xff)
             {
                 FbByteMul(s, a);
@@ -2266,10 +2285,15 @@ static FASTCALL void
 fbCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskAlphaC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
-        CARD32 a = ~mask[i];
+	CARD32 s = src[i];
+	CARD32 m = mask[i];
+	CARD32 a;
+
+	fbCombineMaskAlphaC (&s, &m);
 
+        a = ~m;
         if (a != 0xffffffff)
         {
             CARD32 d = 0;
@@ -2287,12 +2311,18 @@ static FASTCALL void
 fbCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 d = dest[i];
         CARD32 s = src[i];
-        CARD32 ad = ~mask[i];
+        CARD32 m = mask[i];
+        CARD32 ad;
         CARD16 as = d >> 24;
+
+	fbCombineMaskC (&s, &m);
+
+        ad = ~m;
+
         FbByteAddMulC(d, ad, s, as);
         dest[i] = d;
     }
@@ -2302,13 +2332,19 @@ static FASTCALL void
 fbCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
 
         CARD32 d = dest[i];
         CARD32 s = src[i];
-        CARD32 ad = mask[i];
+        CARD32 m = mask[i];
+        CARD32 ad;
         CARD16 as = ~d >> 24;
+
+	fbCombineMaskC (&s, &m);
+
+	ad = m;
+
         FbByteAddMulC(d, ad, s, as);
         dest[i] = d;
     }
@@ -2318,12 +2354,18 @@ static FASTCALL void
 fbCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 d = dest[i];
         CARD32 s = src[i];
-        CARD32 ad = ~mask[i];
+        CARD32 m = mask[i];
+        CARD32 ad;
         CARD16 as = ~d >> 24;
+
+	fbCombineMaskC (&s, &m);
+
+	ad = ~m;
+
         FbByteAddMulC(d, ad, s, as);
         dest[i] = d;
     }
@@ -2333,10 +2375,14 @@ static FASTCALL void
 fbCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskValueC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32 s = src[i];
+        CARD32 m = mask[i];
         CARD32 d = dest[i];
+
+	fbCombineMaskValueC (&s, &m);
+
         FbByteAdd(d, s);
         dest[i] = d;
     }
@@ -2346,7 +2392,7 @@ static FASTCALL void
 fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32  s, d;
         CARD16  sa, sr, sg, sb, da;
@@ -2355,10 +2401,14 @@ fbCombineSaturateC (CARD32 *dest, CARD32
 
         d = dest[i];
         s = src[i];
-        sa = (mask[i] >> 24);
-        sr = (mask[i] >> 16) & 0xff;
-        sg = (mask[i] >>  8) & 0xff;
-        sb = (mask[i]      ) & 0xff;
+	m = mask[i];
+
+	fbCombineMaskC (&s, &m);
+
+        sa = (m >> 24);
+        sr = (m >> 16) & 0xff;
+        sg = (m >>  8) & 0xff;
+        sb = (m      ) & 0xff;
         da = ~d >> 24;
 
         if (sb <= da)
@@ -2389,7 +2439,7 @@ static FASTCALL void
 fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, CARD8 combine)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32  s, d;
         CARD32  m,n,o,p;
@@ -2399,10 +2449,14 @@ fbCombineDisjointGeneralC (CARD32 *dest,
         CARD8   da;
 
         s = src[i];
-        sa = mask[i];
+        m = mask[i];
         d = dest[i];
         da = d >> 24;
 
+	fbCombineMaskC (&s, &m);
+
+	sa = m;
+
         switch (combine & CombineA) {
         default:
             Fa = 0;
@@ -2509,7 +2563,7 @@ static FASTCALL void
 fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, CARD8 combine)
 {
     int i;
-    fbCombineMaskC(src, mask, width);
+
     for (i = 0; i < width; ++i) {
         CARD32  s, d;
         CARD32  m,n,o,p;
@@ -2519,10 +2573,14 @@ fbCombineConjointGeneralC (CARD32 *dest,
         CARD8   da;
 
         s = src[i];
-        sa = mask[i];
+        m = mask[i];
         d = dest[i];
         da = d >> 24;
 
+	fbCombineMaskC (&s, &m);
+
+        sa = m;
+
         switch (combine & CombineA) {
         default:
             Fa = 0;


More information about the cairo-commit mailing list