From: Søren Sandmann Pedersen Date: Mon, 22 Feb 2010 10:16:27 +0000 (-0500) Subject: Add new FAST_PATH_SIMPLE_REPEAT flag X-Git-Tag: 1.0_branch~628^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb0096a282c5b6e7ca9eb59a05d9ff738dccfd4b;p=profile%2Fivi%2Fpixman.git Add new FAST_PATH_SIMPLE_REPEAT flag This flags indicates that the image is untransformed an repeating. Such images can be composited quickly by simply repeating the composite operation. --- diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 2cafe3a..f4f0397 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -580,6 +580,7 @@ _pixman_choose_implementation (void); #define FAST_PATH_UNIFIED_ALPHA (1 << 9) #define FAST_PATH_SCALE_TRANSFORM (1 << 10) #define FAST_PATH_NEAREST_FILTER (1 << 11) +#define FAST_PATH_SIMPLE_REPEAT (1 << 12) #define _FAST_PATH_STANDARD_FLAGS \ (FAST_PATH_ID_TRANSFORM | \ diff --git a/pixman/pixman.c b/pixman/pixman.c index c7d3bcc..09fc7e1 100644 --- a/pixman/pixman.c +++ b/pixman/pixman.c @@ -456,11 +456,20 @@ get_image_info (pixman_image_t *image, *flags = image->common.flags; if (_pixman_image_is_solid (image)) + { *code = PIXMAN_solid; + } else if (image->common.type == BITS) + { *code = image->bits.format; + + if (!image->common.transform && image->common.repeat == PIXMAN_REPEAT_NORMAL) + *flags |= FAST_PATH_SIMPLE_REPEAT; + } else + { *code = PIXMAN_unknown; + } } static force_inline pixman_bool_t @@ -500,7 +509,6 @@ do_composite (pixman_implementation_t *imp, { pixman_format_code_t src_format, mask_format, dest_format; uint32_t src_flags, mask_flags, dest_flags; - pixman_bool_t src_repeat, mask_repeat; pixman_region32_t region; pixman_box32_t *extents; @@ -528,19 +536,6 @@ do_composite (pixman_implementation_t *imp, src_format = mask_format = PIXMAN_rpixbuf; } - src_repeat = - src->type == BITS && - src_flags & FAST_PATH_ID_TRANSFORM && - src->common.repeat == PIXMAN_REPEAT_NORMAL && - src_format != PIXMAN_solid; - - mask_repeat = - mask && - mask->type == BITS && - mask_flags & FAST_PATH_ID_TRANSFORM && - mask->common.repeat == PIXMAN_REPEAT_NORMAL && - mask_format != PIXMAN_solid; - pixman_region32_init (®ion); if (!pixman_compute_composite_region32 ( @@ -583,7 +578,8 @@ do_composite (pixman_implementation_t *imp, src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height, - src_repeat, mask_repeat, + (src_flags & FAST_PATH_SIMPLE_REPEAT), + (mask_flags & FAST_PATH_SIMPLE_REPEAT), ®ion, info->func);