pixman: Branch 'master' - 2 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Fri May 25 17:13:57 PDT 2012


 pixman/pixman-mmx.c       |    9 +++++++--
 test/composite.c          |   19 ++++++++++---------
 test/scaling-crash-test.c |    7 +++++--
 3 files changed, 22 insertions(+), 13 deletions(-)

New commits:
commit f71e3dba979fcfc1cf87d01137e1e32451a173b1
Author: Ingmar Runge <ingmar at irsoft.de>
Date:   Sat May 19 15:45:18 2012 +0200

    Fix MSVC compilation
    
    Only up to three SSE intrinsics supported in function declaration.

diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 01a2bc9..eb02d1a 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -598,14 +598,14 @@ pack_4xpacked565 (__m64 a, __m64 b)
 #endif
 }
 
+#ifndef _MSC_VER
+
 static force_inline __m64
 pack_4x565 (__m64 v0, __m64 v1, __m64 v2, __m64 v3)
 {
     return pack_4xpacked565 (pack8888 (v0, v1), pack8888 (v2, v3));
 }
 
-#ifndef _MSC_VER
-
 static force_inline __m64
 pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b)
 {
@@ -617,6 +617,11 @@ pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b)
 
 #else
 
+/* MSVC only handles a "pass by register" of up to three SSE intrinsics */
+
+#define pack_4x565(v0, v1, v2, v3) \
+    pack_4xpacked565 (pack8888 (v0, v1), pack8888 (v2, v3))
+
 #define pix_add_mul(x, a, y, b)	 \
     ( x = pix_multiply (x, a),	 \
       y = pix_multiply (y, b),	 \
commit 1e59e18d73a6e45729a99fe6ccc74d61631ff5f0
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Thu May 24 15:30:41 2012 -0400

    test: Composite with solid images instead of using pixman_image_fill_*
    
    There is a couple of places where the test suite uses the
    pixman_image_fill_* functions to initialize images. These functions
    can fail, and will do so if the "fast" implementation is disabled.
    
    So to make sure the test suite passes even using
    PIXMAN_DISABLE="fast", use pixman_image_composite32() with a solid
    image instead of pixman_image_fill_*.

diff --git a/test/composite.c b/test/composite.c
index 48bde9c..94b4825 100644
--- a/test/composite.c
+++ b/test/composite.c
@@ -525,15 +525,16 @@ composite_test (image_t *dst,
 		int testno)
 {
     pixman_color_t fill;
-    pixman_rectangle16_t rect;
     color_t expected, tdst, tsrc, tmsk;
     pixel_checker_t checker;
+    pixman_image_t *solid;
 
     /* Initialize dst */
     compute_pixman_color (dst->color, &fill);
-    rect.x = rect.y = 0;
-    rect.width = rect.height = dst->size;
-    pixman_image_fill_rectangles (PIXMAN_OP_SRC, dst->image, &fill, 1, &rect);
+    solid = pixman_image_create_solid_fill (&fill);
+    pixman_image_composite32 (PIXMAN_OP_SRC, solid, NULL, dst->image,
+			      0, 0, 0, 0, 0, 0, dst->size, dst->size);
+    pixman_image_unref (solid);
 
     if (mask)
     {
@@ -644,16 +645,16 @@ image_init (image_t *info,
 
     if (info->size)
     {
-	pixman_rectangle16_t rect;
+	pixman_image_t *solid;
 
 	info->image = pixman_image_create_bits (info->format->format,
 						info->size, info->size,
 						NULL, 0);
 
-	rect.x = rect.y = 0;
-	rect.width = rect.height = info->size;
-	pixman_image_fill_rectangles (PIXMAN_OP_SRC, info->image, &fill,
-				      1, &rect);
+	solid = pixman_image_create_solid_fill (&fill);
+	pixman_image_composite32 (PIXMAN_OP_SRC, solid, NULL, info->image,
+				  0, 0, 0, 0, 0, 0, info->size, info->size);
+	pixman_image_unref (solid);
 
 	if (sizes[size] & REPEAT)
 	{
diff --git a/test/scaling-crash-test.c b/test/scaling-crash-test.c
index ed57ae0..0dac892 100644
--- a/test/scaling-crash-test.c
+++ b/test/scaling-crash-test.c
@@ -32,8 +32,8 @@ run_test (int32_t		dst_width,
     pixman_transform_t transform;
     uint32_t *         srcbuf;
     uint32_t *         dstbuf;
-    pixman_box32_t     box = { 0, 0, src_width, src_height };
     pixman_color_t     color_cc = { 0xcccc, 0xcccc, 0xcccc, 0xcccc };
+    pixman_image_t *   solid;
     int result;
     int i;
 
@@ -62,7 +62,10 @@ run_test (int32_t		dst_width,
         PIXMAN_a8r8g8b8, src_width, src_height,
 	srcbuf + (src_width + 10) * 5 + 5, (src_width + 10) * 4);
 
-    pixman_image_fill_boxes (PIXMAN_OP_SRC, src_img, &color_cc, 1, &box);
+    solid = pixman_image_create_solid_fill (&color_cc);
+    pixman_image_composite32 (PIXMAN_OP_SRC, solid, NULL, src_img,
+			      0, 0, 0, 0, 0, 0, src_width, src_height);
+    pixman_image_unref (solid);
 
     dst_img = pixman_image_create_bits (
         PIXMAN_a8r8g8b8, dst_width, dst_height, dstbuf, dst_width * 4);


More information about the xorg-commit mailing list