pixman: Branch 'master' - 5 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Mon Oct 19 17:41:48 PDT 2009


 pixman/pixman-image.c   |    2 -
 pixman/pixman-private.h |   18 +++++------
 pixman/pixman-utils.c   |   75 +++++++++++++++++++++++-------------------------
 3 files changed, 44 insertions(+), 51 deletions(-)

New commits:
commit dc46ad274a47d351bacf3c2167c359d23dbaf8b3
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Mon Oct 19 20:32:37 2009 -0400

    Make walk_region_internal() use 32 bit dimensions

diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 3d1ba45..537a4f2 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -375,14 +375,14 @@ walk_region_internal (pixman_implementation_t *imp,
                       pixman_image_t *         src_image,
                       pixman_image_t *         mask_image,
                       pixman_image_t *         dst_image,
-                      int16_t                  src_x,
-                      int16_t                  src_y,
-                      int16_t                  mask_x,
-                      int16_t                  mask_y,
-                      int16_t                  dest_x,
-                      int16_t                  dest_y,
-                      uint16_t                 width,
-                      uint16_t                 height,
+                      int32_t                  src_x,
+                      int32_t                  src_y,
+                      int32_t                  mask_x,
+                      int32_t                  mask_y,
+                      int32_t                  dest_x,
+                      int32_t                  dest_y,
+                      int32_t                  width,
+                      int32_t                  height,
                       pixman_bool_t            src_repeat,
                       pixman_bool_t            mask_repeat,
                       pixman_region32_t *      region,
commit bb3698d47925db77925810c3128be1641f455c60
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Mon Oct 19 20:31:54 2009 -0400

    Make pixman_compute_composite_region32() use 32 bit dimensions

diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index c003235..3d1ba45 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -107,14 +107,14 @@ pixman_compute_composite_region32 (pixman_region32_t * region,
                                    pixman_image_t *    src_image,
                                    pixman_image_t *    mask_image,
                                    pixman_image_t *    dst_image,
-                                   int16_t             src_x,
-                                   int16_t             src_y,
-                                   int16_t             mask_x,
-                                   int16_t             mask_y,
-                                   int16_t             dest_x,
-                                   int16_t             dest_y,
-                                   uint16_t            width,
-                                   uint16_t            height)
+                                   int32_t             src_x,
+                                   int32_t             src_y,
+                                   int32_t             mask_x,
+                                   int32_t             mask_y,
+                                   int32_t             dest_x,
+                                   int32_t             dest_y,
+                                   int32_t             width,
+                                   int32_t             height)
 {
     region->extents.x1 = dest_x;
     region->extents.x2 = dest_x + width;
commit 895c281c4094844f9f955621e4ac1e4394d865f0
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Mon Oct 19 20:30:22 2009 -0400

    Change prototype of _pixman_walk_composite_region from int16_t to int32_t

diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 98691e3..7d7b87d 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -610,14 +610,14 @@ _pixman_walk_composite_region (pixman_implementation_t *imp,
                                pixman_image_t *         src_image,
                                pixman_image_t *         mask_image,
                                pixman_image_t *         dst_image,
-                               int16_t                  src_x,
-                               int16_t                  src_y,
-                               int16_t                  mask_x,
-                               int16_t                  mask_y,
-                               int16_t                  dest_x,
-                               int16_t                  dest_y,
-                               uint16_t                 width,
-                               uint16_t                 height,
+                               int32_t                  src_x,
+                               int32_t                  src_y,
+                               int32_t                  mask_x,
+                               int32_t                  mask_y,
+                               int32_t                  dest_x,
+                               int32_t                  dest_y,
+                               int32_t                  width,
+                               int32_t                  height,
                                pixman_composite_func_t  composite_rect);
 
 void
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 22ee827..c003235 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -468,14 +468,14 @@ _pixman_walk_composite_region (pixman_implementation_t *imp,
                                pixman_image_t *         src_image,
                                pixman_image_t *         mask_image,
                                pixman_image_t *         dst_image,
-                               int16_t                  src_x,
-                               int16_t                  src_y,
-                               int16_t                  mask_x,
-                               int16_t                  mask_y,
-                               int16_t                  dest_x,
-                               int16_t                  dest_y,
-                               uint16_t                 width,
-                               uint16_t                 height,
+                               int32_t                  src_x,
+                               int32_t                  src_y,
+                               int32_t                  mask_x,
+                               int32_t                  mask_y,
+                               int32_t                  dest_x,
+                               int32_t                  dest_y,
+                               int32_t                  width,
+                               int32_t                  height,
                                pixman_composite_func_t  composite_rect)
 {
     pixman_region32_t region;
commit 9cd470665b1bb7e0cb810f2457d3788f7c981072
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Mon Oct 19 20:27:36 2009 -0400

    Remove unused color_table and color_table_size fields

diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
index 59db840..e55ba2c 100644
--- a/pixman/pixman-image.c
+++ b/pixman/pixman-image.c
@@ -48,8 +48,6 @@ _pixman_init_gradient (gradient_t *                  gradient,
     gradient->n_stops = n_stops;
 
     gradient->stop_range = 0xffff;
-    gradient->color_table = NULL;
-    gradient->color_table_size = 0;
     gradient->common.class = SOURCE_IMAGE_CLASS_UNKNOWN;
 
     return TRUE;
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index c5b44bc..98691e3 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -120,8 +120,6 @@ struct gradient
     int                     n_stops;
     pixman_gradient_stop_t *stops;
     int                     stop_range;
-    uint32_t *              color_table;
-    int                     color_table_size;
 };
 
 struct linear_gradient
commit 8186937637f25088e61c22a3ce1740a56f5d6e13
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Sun Oct 18 03:02:28 2009 -0400

    Remove BOUNDS() macro.
    
    It was bounding the clip region to INT16_MIN, INT16_MAX, but this was
    a relic from the X server. We don't need it since we are already
    restricting the clip region to the geometry of the destination.

diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 7128206..22ee827 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -33,8 +33,6 @@
 /*
  * Computing composite region
  */
-#define BOUND(v)        (int16_t) ((v) < INT16_MIN ? INT16_MIN : (v) > INT16_MAX ? INT16_MAX : (v))
-
 static inline pixman_bool_t
 clip_general_image (pixman_region32_t * region,
                     pixman_region32_t * clip,
@@ -49,17 +47,17 @@ clip_general_image (pixman_region32_t * region,
 	int v;
 
 	if (rbox->x1 < (v = cbox->x1 + dx))
-	    rbox->x1 = BOUND (v);
+	    rbox->x1 = v;
 	if (rbox->x2 > (v = cbox->x2 + dx))
-	    rbox->x2 = BOUND (v);
+	    rbox->x2 = v;
 	if (rbox->y1 < (v = cbox->y1 + dy))
-	    rbox->y1 = BOUND (v);
+	    rbox->y1 = v;
 	if (rbox->y2 > (v = cbox->y2 + dy))
-	    rbox->y2 = BOUND (v);
-	if (rbox->x1 >= rbox->x2 ||
-	    rbox->y1 >= rbox->y2)
+	    rbox->y2 = v;
+	if (rbox->x1 >= rbox->x2 || rbox->y1 >= rbox->y2)
 	{
 	    pixman_region32_init (region);
+	    return FALSE;
 	}
     }
     else if (!pixman_region32_not_empty (clip))
@@ -70,11 +68,14 @@ clip_general_image (pixman_region32_t * region,
     {
 	if (dx || dy)
 	    pixman_region32_translate (region, -dx, -dy);
+
 	if (!pixman_region32_intersect (region, region, clip))
 	    return FALSE;
+
 	if (dx || dy)
 	    pixman_region32_translate (region, dx, dy);
     }
+
     return pixman_region32_not_empty (region);
 }
 
@@ -115,14 +116,10 @@ pixman_compute_composite_region32 (pixman_region32_t * region,
                                    uint16_t            width,
                                    uint16_t            height)
 {
-    int v;
-
     region->extents.x1 = dest_x;
-    v = dest_x + width;
-    region->extents.x2 = BOUND (v);
+    region->extents.x2 = dest_x + width;
     region->extents.y1 = dest_y;
-    v = dest_y + height;
-    region->extents.y2 = BOUND (v);
+    region->extents.y2 = dest_y + height;
 
     region->extents.x1 = MAX (region->extents.x1, 0);
     region->extents.y1 = MAX (region->extents.y1, 0);
@@ -617,7 +614,7 @@ sources_cover (pixman_image_t *src,
 
     if (!mask)
 	return TRUE;
-    
+
     if (!image_covers (mask, extents, dest_x - mask_x, dest_y - mask_y))
 	return FALSE;
 


More information about the xorg-commit mailing list