Delete struct point
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Mon, 22 Jun 2009 02:16:39 +0000 (22:16 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Mon, 22 Jun 2009 02:36:15 +0000 (22:36 -0400)
pixman/pixman-bits-image.c
pixman/pixman-image.c
pixman/pixman-private.h
pixman/pixman-utils.c

index e847cb9..b60b659 100644 (file)
@@ -54,8 +54,8 @@ bits_image_store_scanline_32 (bits_image_t *image, int x, int y, int width, uint
 
     if (image->common.alpha_map)
     {
-       x -= image->common.alpha_origin.x;
-       y -= image->common.alpha_origin.y;
+       x -= image->common.alpha_origin_x;
+       y -= image->common.alpha_origin_y;
 
        bits_image_store_scanline_32 (image->common.alpha_map, x, y, width, buffer);
     }
@@ -76,8 +76,8 @@ bits_image_store_scanline_64 (bits_image_t *image, int x, int y, int width, uint
 
     if (image->common.alpha_map)
     {
-       x -= image->common.alpha_origin.x;
-       y -= image->common.alpha_origin.y;
+       x -= image->common.alpha_origin_x;
+       y -= image->common.alpha_origin_y;
 
        bits_image_store_scanline_64 (image->common.alpha_map, x, y, width, buffer);
     }
@@ -143,7 +143,7 @@ bits_image_fetch_alpha_pixels (bits_image_t *image, uint32_t *buffer, int n_pixe
            
            if (x != 0xffffffff)
            {
-               x -= image->common.alpha_origin.x;
+               x -= image->common.alpha_origin_x;
                
                if (x < 0 || x >= image->common.alpha_map->width)
                    x = 0xffffffff;
@@ -151,7 +151,7 @@ bits_image_fetch_alpha_pixels (bits_image_t *image, uint32_t *buffer, int n_pixe
            
            if (y != 0xffffffff)
            {
-               y -= image->common.alpha_origin.y;
+               y -= image->common.alpha_origin_y;
                
                if (y < 0 || y >= image->common.alpha_map->height)
                    y = 0xffffffff;
index ec66de5..ad17f47 100644 (file)
@@ -433,8 +433,8 @@ pixman_image_set_alpha_map (pixman_image_t *image,
            common->alpha_map = NULL;
     }
 
-    common->alpha_origin.x = x;
-    common->alpha_origin.y = y;
+    common->alpha_origin_x = x;
+    common->alpha_origin_y = y;
 
     image_property_changed (image);
 }
index 2553e00..6eefaa7 100644 (file)
@@ -59,7 +59,9 @@
 #endif
 
 
-
+/*
+ * Images
+ */
 typedef struct image_common image_common_t;
 typedef struct source_image source_image_t;
 typedef struct solid_fill solid_fill_t;
@@ -71,7 +73,6 @@ typedef struct conical_gradient conical_gradient_t;
 typedef struct radial_gradient radial_gradient_t;
 typedef struct bits_image bits_image_t;
 typedef struct circle circle_t;
-typedef struct point point_t;
 
 /* FIXME - the types and structures below should be give proper names
  */
@@ -162,11 +163,6 @@ _pixman_init_gradient (gradient_t     *gradient,
 void
 _pixman_image_reset_clip_region (pixman_image_t *image);
 
-struct point
-{
-    int16_t x, y;
-};
-
 typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,
                                                 int             x,
                                                 int             y,
@@ -190,7 +186,8 @@ struct image_common
     pixman_fixed_t            *filter_params;
     int                                n_filter_params;
     bits_image_t              *alpha_map;
-    point_t                    alpha_origin;
+    int                                alpha_origin_x;
+    int                                alpha_origin_y;
     pixman_bool_t              component_alpha;
     pixman_read_memory_func_t  read_func;
     pixman_write_memory_func_t write_func;
@@ -495,13 +492,6 @@ uint32_t
 pixman_image_get_solid (pixman_image_t *image,
                        pixman_format_code_t format);
 
-/* Region Helpers */
-pixman_bool_t pixman_region32_copy_from_region16 (pixman_region32_t *dst,
-                                                 pixman_region16_t *src);
-pixman_bool_t pixman_region16_copy_from_region32 (pixman_region16_t *dst,
-                                                 pixman_region32_t *src);
-
-
 /*
  * Implementations
  */
@@ -704,10 +694,17 @@ typedef struct
 } pixman_fast_path_t;
 
 /* Memory allocation helpers */
-void          *pixman_malloc_ab (unsigned int n, unsigned int b);
-void          *pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
-pixman_bool_t  pixman_multiply_overflows_int (unsigned int a, unsigned int b);
-pixman_bool_t  pixman_addition_overflows_int (unsigned int a, unsigned int b);
+void *
+pixman_malloc_ab (unsigned int n, unsigned int b);
+
+void *
+pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
+
+pixman_bool_t
+pixman_multiply_overflows_int (unsigned int a, unsigned int b);
+
+pixman_bool_t
+pixman_addition_overflows_int (unsigned int a, unsigned int b);
 
 /* Compositing utilities */
 pixman_bool_t
@@ -742,6 +739,16 @@ _pixman_walk_composite_region (pixman_implementation_t *imp,
                               uint16_t height,
                               pixman_composite_func_t compositeRect);
 
+/* Region Helpers */
+pixman_bool_t
+pixman_region32_copy_from_region16 (pixman_region32_t *dst,
+                                   pixman_region16_t *src);
+
+pixman_bool_t
+pixman_region16_copy_from_region32 (pixman_region16_t *dst,
+                                   pixman_region32_t *src);
+
+
 /*
  * Various useful macros
  */
index fdd2426..ff3d322 100644 (file)
@@ -159,8 +159,8 @@ pixman_compute_composite_region32 (pixman_region32_t *      pRegion,
     if (pDst->common.alpha_map && pDst->common.alpha_map->common.have_clip_region)
     {
        if (!miClipPictureReg (pRegion, &pDst->common.alpha_map->common.clip_region,
-                              -pDst->common.alpha_origin.x,
-                              -pDst->common.alpha_origin.y))
+                              -pDst->common.alpha_origin_x,
+                              -pDst->common.alpha_origin_y))
        {
            pixman_region32_fini (pRegion);
            return FALSE;
@@ -179,8 +179,8 @@ pixman_compute_composite_region32 (pixman_region32_t *      pRegion,
     if (pSrc->common.alpha_map && pSrc->common.alpha_map->common.have_clip_region)
     {
        if (!miClipPictureSrc (pRegion, (pixman_image_t *)pSrc->common.alpha_map,
-                              xDst - (xSrc - pSrc->common.alpha_origin.x),
-                              yDst - (ySrc - pSrc->common.alpha_origin.y)))
+                              xDst - (xSrc - pSrc->common.alpha_origin_x),
+                              yDst - (ySrc - pSrc->common.alpha_origin_y)))
        {
            pixman_region32_fini (pRegion);
            return FALSE;
@@ -197,8 +197,8 @@ pixman_compute_composite_region32 (pixman_region32_t *      pRegion,
        if (pMask->common.alpha_map && pMask->common.alpha_map->common.have_clip_region)
        {
            if (!miClipPictureSrc (pRegion, (pixman_image_t *)pMask->common.alpha_map,
-                                  xDst - (xMask - pMask->common.alpha_origin.x),
-                                  yDst - (yMask - pMask->common.alpha_origin.y)))
+                                  xDst - (xMask - pMask->common.alpha_origin_x),
+                                  yDst - (yMask - pMask->common.alpha_origin_y)))
            {
                pixman_region32_fini (pRegion);
                return FALSE;