From: Søren Sandmann Pedersen Date: Mon, 22 Jun 2009 02:16:39 +0000 (-0400) Subject: Delete struct point X-Git-Tag: 1.0_branch~1008 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b616c5725891f2f2d21b71796fb9af5644260e4;p=profile%2Fivi%2Fpixman.git Delete struct point --- diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index e847cb9..b60b659 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -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; diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index ec66de5..ad17f47 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -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); } diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 2553e00..6eefaa7 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -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 */ diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c index fdd2426..ff3d322 100644 --- a/pixman/pixman-utils.c +++ b/pixman/pixman-utils.c @@ -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;