diff options
author | Søren Sandmann Pedersen <soren.sandmann@gmail.com> | 2018-04-02 19:44:42 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <soren.sandmann@gmail.com> | 2018-04-02 19:44:42 -0400 |
commit | b88ce51589f73a69b724a01c6cbe18ddce5be39a (patch) | |
tree | bfa3e9faf5f8d16ad8aeab3077e2940736d0717f | |
parent | 2621410e371b25b9b743bdbef29b5d358ddec331 (diff) |
trailing spacefloat-imp
-rw-r--r-- | pixman/pixman-access.c | 64 | ||||
-rw-r--r-- | pixman/pixman-bits-image.c | 2 | ||||
-rw-r--r-- | pixman/pixman-combine-float.c | 16 | ||||
-rw-r--r-- | pixman/pixman-combine32.c | 4 | ||||
-rw-r--r-- | pixman/pixman-edge.c | 4 | ||||
-rw-r--r-- | pixman/pixman-fast-path.c | 14 | ||||
-rw-r--r-- | pixman/pixman-filter.c | 44 | ||||
-rw-r--r-- | pixman/pixman-general.c | 6 | ||||
-rw-r--r-- | pixman/pixman-glyph.c | 6 | ||||
-rw-r--r-- | pixman/pixman-gradient-walker.c | 12 | ||||
-rw-r--r-- | pixman/pixman-image.c | 2 | ||||
-rw-r--r-- | pixman/pixman-implementation.c | 2 | ||||
-rw-r--r-- | pixman/pixman-linear-gradient.c | 2 | ||||
-rw-r--r-- | pixman/pixman-matrix.c | 32 | ||||
-rw-r--r-- | pixman/pixman-mmx.c | 2 | ||||
-rw-r--r-- | pixman/pixman-noop.c | 4 | ||||
-rw-r--r-- | pixman/pixman-radial-gradient.c | 2 | ||||
-rw-r--r-- | pixman/pixman-region.c | 62 | ||||
-rw-r--r-- | pixman/pixman-sse2.c | 12 | ||||
-rw-r--r-- | pixman/pixman-ssse3.c | 12 | ||||
-rw-r--r-- | pixman/pixman-trap.c | 40 | ||||
-rw-r--r-- | pixman/pixman.c | 14 |
22 files changed, 179 insertions, 179 deletions
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c index 8298781f..7a9ee0aa 100644 --- a/pixman/pixman-access.c +++ b/pixman/pixman-access.c @@ -34,7 +34,7 @@ #include <math.h> #include "pixman-private.h" - + #define CONVERT_RGB24_TO_Y15(s) \ (((((s) >> 16) & 0xff) * 153 + \ (((s) >> 8) & 0xff) * 301 + \ @@ -743,7 +743,7 @@ fetch_scanline_yuy2 (bits_image_t *image, { const uint32_t *bits = image->bits + image->rowstride * line; int i; - + for (i = 0; i < width; i++) { int16_t y, u, v; @@ -780,7 +780,7 @@ fetch_scanline_yv12 (bits_image_t *image, uint8_t *u_line = YV12_U (line); uint8_t *v_line = YV12_V (line); int i; - + for (i = 0; i < width; i++) { int16_t y, u, v; @@ -912,23 +912,23 @@ fetch_pixel_yuy2 (bits_image_t *image, int line) { const uint32_t *bits = image->bits + image->rowstride * line; - + int16_t y, u, v; int32_t r, g, b; - + y = ((uint8_t *) bits)[offset << 1] - 16; u = ((uint8_t *) bits)[((offset << 1) & - 4) + 1] - 128; v = ((uint8_t *) bits)[((offset << 1) & - 4) + 3] - 128; - + /* R = 1.164(Y - 16) + 1.596(V - 128) */ r = 0x012b27 * y + 0x019a2e * v; - + /* G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) */ g = 0x012b27 * y - 0x00d0f2 * v - 0x00647e * u; - + /* B = 1.164(Y - 16) + 2.018(U - 128) */ b = 0x012b27 * y + 0x0206a2 * u; - + return 0xff000000 | (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) | (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) | @@ -945,16 +945,16 @@ fetch_pixel_yv12 (bits_image_t *image, int16_t u = YV12_U (line)[offset >> 1] - 128; int16_t v = YV12_V (line)[offset >> 1] - 128; int32_t r, g, b; - + /* R = 1.164(Y - 16) + 1.596(V - 128) */ r = 0x012b27 * y + 0x019a2e * v; - + /* G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) */ g = 0x012b27 * y - 0x00d0f2 * v - 0x00647e * u; - + /* B = 1.164(Y - 16) + 2.018(U - 128) */ b = 0x012b27 * y + 0x0206a2 * u; - + return 0xff000000 | (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) | (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) | @@ -1149,7 +1149,7 @@ fetch_scanline_a8r8g8b8_32_sRGB (bits_image_t *image, const uint32_t *pixel = (uint32_t *)bits + x; const uint32_t *end = pixel + width; uint32_t tmp; - + while (pixel < end) { uint8_t a, r, g, b; @@ -1202,7 +1202,7 @@ store_scanline_a8r8g8b8_32_sRGB (bits_image_t *image, uint32_t *pixel = bits + x; uint64_t tmp; int i; - + for (i = 0; i < width; ++i) { uint8_t a, r, g, b; @@ -1299,11 +1299,11 @@ static const format_info_t accessors[] = /* 24bpp formats */ FORMAT_INFO (r8g8b8), FORMAT_INFO (b8g8r8), - + /* 16bpp formats */ FORMAT_INFO (r5g6b5), FORMAT_INFO (b5g6r5), - + FORMAT_INFO (a1r5g5b5), FORMAT_INFO (x1r5g5b5), FORMAT_INFO (a1b5g5r5), @@ -1312,47 +1312,47 @@ static const format_info_t accessors[] = FORMAT_INFO (x4r4g4b4), FORMAT_INFO (a4b4g4r4), FORMAT_INFO (x4b4g4r4), - + /* 8bpp formats */ FORMAT_INFO (a8), FORMAT_INFO (r3g3b2), FORMAT_INFO (b2g3r3), FORMAT_INFO (a2r2g2b2), FORMAT_INFO (a2b2g2r2), - + FORMAT_INFO (c8), - + FORMAT_INFO (g8), - + #define fetch_scanline_x4c4 fetch_scanline_c8 #define fetch_pixel_x4c4 fetch_pixel_c8 #define store_scanline_x4c4 store_scanline_c8 FORMAT_INFO (x4c4), - + #define fetch_scanline_x4g4 fetch_scanline_g8 #define fetch_pixel_x4g4 fetch_pixel_g8 #define store_scanline_x4g4 store_scanline_g8 FORMAT_INFO (x4g4), - + FORMAT_INFO (x4a4), - + /* 4bpp formats */ FORMAT_INFO (a4), FORMAT_INFO (r1g2b1), FORMAT_INFO (b1g2r1), FORMAT_INFO (a1r1g1b1), FORMAT_INFO (a1b1g1r1), - + FORMAT_INFO (c4), - + FORMAT_INFO (g4), - + /* 1bpp formats */ FORMAT_INFO (a1), FORMAT_INFO (g1), - + /* Wide formats */ - + { PIXMAN_a2r10g10b10, NULL, fetch_scanline_a2r10g10b10_float, fetch_pixel_generic_lossy_32, fetch_pixel_a2r10g10b10_float, @@ -1383,7 +1383,7 @@ static const format_info_t accessors[] = fetch_scanline_yv12, fetch_scanline_generic_float, fetch_pixel_yv12, fetch_pixel_generic_float, NULL, NULL }, - + { PIXMAN_null }, }; @@ -1391,7 +1391,7 @@ void _pixman_bits_image_setup_accessors (bits_image_t *image) { const format_info_t *info = accessors; - + while (info->format != PIXMAN_null) { if (info->format == image->format) @@ -1402,7 +1402,7 @@ _pixman_bits_image_setup_accessors (bits_image_t *image) image->fetch_pixel_float = info->fetch_pixel_float; image->store_scanline_32 = info->store_scanline_32; image->store_scanline_float = info->store_scanline_float; - + return; } diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index 04bb5494..2fb60418 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -638,7 +638,7 @@ pixman_bool_t _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter) { #define IMAGE_FLAGS (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_NO_ACCESSORS) - + if ((iter->iter_flags & ITER_NARROW) && (image->common.flags & IMAGE_FLAGS) == IMAGE_FLAGS) { diff --git a/pixman/pixman-combine-float.c b/pixman/pixman-combine-float.c index f5145bc9..3496f572 100644 --- a/pixman/pixman-combine-float.c +++ b/pixman/pixman-combine-float.c @@ -59,12 +59,12 @@ combine_inner (pixman_bool_t component, float sr = src[i + 1]; float sg = src[i + 2]; float sb = src[i + 3]; - + float da = dest[i + 0]; float dr = dest[i + 1]; float dg = dest[i + 2]; float db = dest[i + 3]; - + dest[i + 0] = combine_a (sa, sa, da, da); dest[i + 1] = combine_c (sa, sr, da, dr); dest[i + 2] = combine_c (sa, sg, da, dg); @@ -78,12 +78,12 @@ combine_inner (pixman_bool_t component, float sa, sr, sg, sb; float ma, mr, mg, mb; float da, dr, dg, db; - + sa = src[i + 0]; sr = src[i + 1]; sg = src[i + 2]; sb = src[i + 3]; - + if (component) { ma = mask[i + 0]; @@ -113,12 +113,12 @@ combine_inner (pixman_bool_t component, ma = mr = mg = mb = sa; } - + da = dest[i + 0]; dr = dest[i + 1]; dg = dest[i + 2]; db = dest[i + 3]; - + dest[i + 0] = combine_a (ma, sa, da, da); dest[i + 1] = combine_c (mr, sr, da, dr); dest[i + 2] = combine_c (mg, sg, da, dg); @@ -917,7 +917,7 @@ blend_hsl_hue (rgb_t *res, set_lum (res, sa * da, get_lum (dest) * sa); } -/* +/* * Saturation * * as * ad * B(s/as, d/ad) @@ -939,7 +939,7 @@ blend_hsl_saturation (rgb_t *res, set_lum (res, sa * da, get_lum (dest) * sa); } -/* +/* * Color * * as * ad * B(s/as, d/as) diff --git a/pixman/pixman-combine32.c b/pixman/pixman-combine32.c index 4c484d3e..bc2683ce 100644 --- a/pixman/pixman-combine32.c +++ b/pixman/pixman-combine32.c @@ -60,7 +60,7 @@ combine_mask_ca (uint32_t *src, uint32_t *mask) xa = x >> A_SHIFT; UN8x4_MUL_UN8x4 (x, a); *(src) = x; - + UN8x4_MUL_UN8 (a, xa); *(mask) = a; } @@ -723,7 +723,7 @@ blend_lighten (int32_t d, int32_t ad, int32_t s, int32_t as) { s = ad * s; d = as * d; - + return s > d ? s : d; } diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c index 3a6b3001..03702adf 100644 --- a/pixman/pixman-edge.c +++ b/pixman/pixman-edge.c @@ -353,7 +353,7 @@ rasterize_edges_8 (pixman_image_t *image, fill_start = fill_end = -1; fill_size = 0; } - + line += stride; } } @@ -399,7 +399,7 @@ pixman_rasterize_edges (pixman_image_t *image, { return_if_fail (image->type == BITS); return_if_fail (PIXMAN_FORMAT_TYPE (image->bits.format) == PIXMAN_TYPE_A); - + if (image->bits.read_func || image->bits.write_func) pixman_rasterize_edges_accessors (image, l, r, t, b); else diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c index b4daa265..06d8fcf2 100644 --- a/pixman/pixman-fast-path.c +++ b/pixman/pixman-fast-path.c @@ -2478,7 +2478,7 @@ fail: */ _pixman_log_error ( FUNC, "Allocation failure or bad matrix, skipping rendering\n"); - + iter->get_scanline = _pixman_iter_get_scanline_noop; iter->fini = NULL; } @@ -2786,7 +2786,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image, pixman_fixed_t fx = *x_params++; int rx = j; int ry = i; - + if (fx) { pixman_fixed_t f; @@ -3007,7 +3007,7 @@ bits_image_fetch_nearest_affine (pixman_image_t * image, int width, uint32_t * buffer, const uint32_t * mask, - + convert_pixel_t convert_pixel, pixman_format_code_t format, pixman_repeat_t repeat_mode) @@ -3168,7 +3168,7 @@ MAKE_FETCHERS (normal_r5g6b5, r5g6b5, PIXMAN_REPEAT_NORMAL) (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | \ FAST_PATH_BITS_IMAGE | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST) -static const pixman_iter_info_t fast_iters[] = +static const pixman_iter_info_t fast_iters[] = { { PIXMAN_r5g6b5, IMAGE_FLAGS, ITER_NARROW | ITER_SRC, _pixman_iter_init_bits_stride, fast_fetch_r5g6b5, NULL }, @@ -3177,7 +3177,7 @@ static const pixman_iter_info_t fast_iters[] = ITER_NARROW | ITER_DEST, _pixman_iter_init_bits_stride, fast_fetch_r5g6b5, fast_write_back_r5g6b5 }, - + { PIXMAN_r5g6b5, FAST_PATH_STD_DEST_FLAGS, ITER_NARROW | ITER_DEST | ITER_IGNORE_RGB | ITER_IGNORE_ALPHA, _pixman_iter_init_bits_stride, @@ -3235,7 +3235,7 @@ static const pixman_iter_info_t fast_iters[] = FAST_PATH_HAS_TRANSFORM | \ FAST_PATH_AFFINE_TRANSFORM | \ FAST_PATH_SEPARABLE_CONVOLUTION_FILTER) - + #define SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat) \ { PIXMAN_ ## format, \ GENERAL_SEPARABLE_CONVOLUTION_FLAGS | FAST_PATH_ ## repeat ## _REPEAT, \ @@ -3261,7 +3261,7 @@ static const pixman_iter_info_t fast_iters[] = NEAREST_AFFINE_FAST_PATH(name, format, repeat) \ BILINEAR_AFFINE_FAST_PATH(name, format, repeat) \ SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat) - + AFFINE_FAST_PATHS (pad_a8r8g8b8, a8r8g8b8, PAD) AFFINE_FAST_PATHS (none_a8r8g8b8, a8r8g8b8, NONE) AFFINE_FAST_PATHS (reflect_a8r8g8b8, a8r8g8b8, REFLECT) diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index 5f3b752f..1b4ccea0 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -12,7 +12,7 @@ * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -65,7 +65,7 @@ gaussian_kernel (double x) { #define SQRT2 (1.4142135623730950488016887242096980785696718753769480) #define SIGMA (SQRT2 / 2.0) - + return exp (- x * x / (2 * SIGMA * SIGMA)) / (SIGMA * sqrt (2.0 * M_PI)); } @@ -347,55 +347,55 @@ gnuplot_filter (int width, int n_phases, const pixman_fixed_t* p) /* The position of the first sample of the phase corresponding to * frac is given by: - * + * * ceil (frac - width / 2.0 - 0.5) + 0.5 - frac - * + * * We have to find the frac that minimizes this expression. - * + * * For odd widths, we have - * + * * ceil (frac - width / 2.0 - 0.5) + 0.5 - frac * = ceil (frac) + K - frac * = 1 + K - frac - * + * * for some K, so this is minimized when frac is maximized and * strictly growing with frac. So for odd widths, we can simply * start at the last phase and go backwards. - * + * * For even widths, we have - * + * * ceil (frac - width / 2.0 - 0.5) + 0.5 - frac * = ceil (frac - 0.5) + K - frac - * + * * The graph for this function (ignoring K) looks like this: - * + * * 0.5 - * | |\ - * | | \ - * | | \ - * 0 | | \ + * | |\ + * | | \ + * | | \ + * 0 | | \ * |\ | * | \ | * | \ | * -0.5 | \| * --------------------------------- * 0 0.5 1 - * + * * So in this case we need to start with the phase whose frac is * less than, but as close as possible to 0.5, then go backwards * until we hit the first phase, then wrap around to the last * phase and continue backwards. - * + * * Which phase is as close as possible 0.5? The locations of the * sampling point corresponding to the kth phase is given by * 1/(2 * n_phases) + k / n_phases: - * + * * 1/(2 * n_phases) + k / n_phases = 0.5 - * + * * from which it follows that - * + * * k = (n_phases - 1) / 2 - * + * * rounded down is the phase in question. */ if (width & 1) @@ -455,7 +455,7 @@ pixman_filter_create_separable_convolution (int *n_values, subsample_y = (1 << subsample_bits_y); *n_values = 4 + width * subsample_x + height * subsample_y; - + params = malloc (*n_values * sizeof (pixman_fixed_t)); if (!params) return NULL; diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c index 72b2e0fc..fce135be 100644 --- a/pixman/pixman-general.c +++ b/pixman/pixman-general.c @@ -193,7 +193,7 @@ general_composite_rect (pixman_implementation_t *imp, memset (mask_buffer, 0, width * Bpp); memset (dest_buffer, 0, width * Bpp); } - + /* src iter */ src_iter_flags = width_flag | op_flags[op].src | ITER_SRC; @@ -247,7 +247,7 @@ general_composite_rect (pixman_implementation_t *imp, mask_iter.fini (&mask_iter); if (dest_iter.fini) dest_iter.fini (&dest_iter); - + if (scanline_buffer != (uint8_t *) stack_scanline_buffer) free (scanline_buffer); } @@ -313,7 +313,7 @@ pixman_composite_bounds (pixman_op_t op, dest_buffer = mask_buffer + width * 4; lower_buffer = dest_buffer + width * 4; upper_buffer = dest_buffer + width * 4; - + _pixman_implementation_iter_init ( float_imp, &src_iter, src, src_x, src_y, width, height, (uint8_t *)src_buffer, ITER_WIDE | ITER_SRC, 0); diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c index 96a349ab..4db66a3f 100644 --- a/pixman/pixman-glyph.c +++ b/pixman/pixman-glyph.c @@ -418,10 +418,10 @@ pixman_composite_glyphs_no_mask (pixman_op_t op, _pixman_image_validate (src); _pixman_image_validate (dest); - + dest_format = dest->common.extended_format_code; dest_flags = dest->common.flags; - + pixman_region32_init (®ion); if (!_pixman_compute_composite_region32 ( ®ion, @@ -623,7 +623,7 @@ out: * * Then (mask_x, mask_y) in the infinite mask and (src_x, src_y) in the source * image are both aligned with (dest_x, dest_y) in the destination image. Then - * these three images are composited within the + * these three images are composited within the * * (dest_x, dest_y, dst_x + width, dst_y + height) * diff --git a/pixman/pixman-gradient-walker.c b/pixman/pixman-gradient-walker.c index 822f8e62..42b6477b 100644 --- a/pixman/pixman-gradient-walker.c +++ b/pixman/pixman-gradient-walker.c @@ -76,16 +76,16 @@ gradient_walker_reset (pixman_gradient_walker_t *walker, { x = pos; } - + for (n = 0; n < count; n++) { if (x < stops[n].x) break; } - + left_x = stops[n - 1].x; left_c = &stops[n - 1].color; - + right_x = stops[n].x; right_c = &stops[n].color; @@ -136,10 +136,10 @@ gradient_walker_reset (pixman_gradient_walker_t *walker, rr = (right_c->red * (1.0f/257.0f)); rg = (right_c->green * (1.0f/257.0f)); rb = (right_c->blue * (1.0f/257.0f)); - + lx = left_x * (1.0f/65536.0f); rx = right_x * (1.0f/65536.0f); - + if (FLOAT_IS_ZERO (rx - lx) || left_x == INT32_MIN || right_x == INT32_MAX) { walker->a_s = walker->r_s = walker->g_s = walker->b_s = 0.0f; @@ -162,7 +162,7 @@ gradient_walker_reset (pixman_gradient_walker_t *walker, walker->g_s = (rg - lg) * w_rec * (1.0f/255.0f); walker->b_s = (rb - lb) * w_rec * (1.0f/255.0f); } - + walker->left_x = left_x; walker->right_x = right_x; diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 3424f189..c35de6e8 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -719,7 +719,7 @@ pixman_image_set_filter (pixman_image_t * image, return_val_if_fail ( n_params == 4 + n_x_phases * width + n_y_phases * height, FALSE); } - + new_params = NULL; if (params) { diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c index 2c7de4c6..e8c5a5f8 100644 --- a/pixman/pixman-implementation.c +++ b/pixman/pixman-implementation.c @@ -204,7 +204,7 @@ _pixman_implementation_lookup_combiner (pixman_implementation_t *imp, case 0: /* not narrow, not component alpha */ f = (pixman_combine_32_func_t)imp->combine_float[op]; break; - + case 1: /* not narrow, component_alpha */ f = (pixman_combine_32_func_t)imp->combine_float_ca[op]; break; diff --git a/pixman/pixman-linear-gradient.c b/pixman/pixman-linear-gradient.c index 561e0a0d..e8076f22 100644 --- a/pixman/pixman-linear-gradient.c +++ b/pixman/pixman-linear-gradient.c @@ -143,7 +143,7 @@ linear_get_scanline_narrow (pixman_iter_t *iter, { double invden = (double) pixman_fixed_1 / l; - t = ((dx * v.vector[0] + dy * v.vector[1]) - + t = ((dx * v.vector[0] + dy * v.vector[1]) - (dx * linear->p1.x + dy * linear->p1.y)) * invden; inc = (dx * unit.vector[0] + dy * unit.vector[1]) * invden; } diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c index 4032c137..9bb40d08 100644 --- a/pixman/pixman-matrix.c +++ b/pixman/pixman-matrix.c @@ -434,7 +434,7 @@ pixman_transform_multiply (struct pixman_transform * dst, { pixman_fixed_48_16_t v; pixman_fixed_32_32_t partial; - + v = 0; for (o = 0; o < 3; o++) { @@ -447,7 +447,7 @@ pixman_transform_multiply (struct pixman_transform * dst, if (v > pixman_max_fixed_48_16 || v < pixman_min_fixed_48_16) return FALSE; - + d.matrix[dy][dx] = (pixman_fixed_t) v; } } @@ -491,7 +491,7 @@ pixman_transform_scale (struct pixman_transform *forward, if (!pixman_transform_multiply (forward, &t, forward)) return FALSE; } - + if (reverse) { pixman_transform_init_scale (&t, fixed_inverse (sx), @@ -499,7 +499,7 @@ pixman_transform_scale (struct pixman_transform *forward, if (!pixman_transform_multiply (reverse, reverse, &t)) return FALSE; } - + return TRUE; } @@ -538,7 +538,7 @@ pixman_transform_rotate (struct pixman_transform *forward, if (!pixman_transform_multiply (reverse, reverse, &t)) return FALSE; } - + return TRUE; } @@ -765,7 +765,7 @@ pixman_transform_from_pixman_f_transform (struct pixman_transform * t, t->matrix[j][i] = (pixman_fixed_t) floor (d); } } - + return TRUE; } @@ -791,10 +791,10 @@ pixman_f_transform_invert (struct pixman_f_transform * dst, p = -p; det += p; } - + if (det == 0) return FALSE; - + det = 1 / det; for (j = 0; j < 3; j++) { @@ -808,10 +808,10 @@ pixman_f_transform_invert (struct pixman_f_transform * dst, p = (src->m[ai][aj] * src->m[bi][bj] - src->m[ai][bj] * src->m[bi][aj]); - + if (((i + j) & 1) != 0) p = -p; - + d.m[j][i] = det * p; } } @@ -836,7 +836,7 @@ pixman_f_transform_point (const struct pixman_f_transform *t, a += t->m[j][i] * v->v[i]; result.v[j] = a; } - + if (!result.v[2]) return FALSE; @@ -863,7 +863,7 @@ pixman_f_transform_point_3d (const struct pixman_f_transform *t, a += t->m[j][i] * v->v[i]; result.v[j] = a; } - + *v = result; } @@ -886,7 +886,7 @@ pixman_f_transform_multiply (struct pixman_f_transform * dst, d.m[dy][dx] = v; } } - + *dst = d; } @@ -922,13 +922,13 @@ pixman_f_transform_scale (struct pixman_f_transform *forward, pixman_f_transform_init_scale (&t, sx, sy); pixman_f_transform_multiply (forward, &t, forward); } - + if (reverse) { pixman_f_transform_init_scale (&t, 1 / sx, 1 / sy); pixman_f_transform_multiply (reverse, reverse, &t); } - + return TRUE; } @@ -961,7 +961,7 @@ pixman_f_transform_rotate (struct pixman_f_transform *forward, pixman_f_transform_init_rotate (&t, c, s); pixman_f_transform_multiply (forward, &t, forward); } - + if (reverse) { pixman_f_transform_init_rotate (&t, c, -s); diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index dec39743..941d51a4 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -3989,7 +3989,7 @@ mmx_fetch_a8 (pixman_iter_t *iter, const uint32_t *mask) (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | \ FAST_PATH_BITS_IMAGE | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST) -static const pixman_iter_info_t mmx_iters[] = +static const pixman_iter_info_t mmx_iters[] = { { PIXMAN_x8r8g8b8, IMAGE_FLAGS, ITER_NARROW, _pixman_iter_init_bits_stride, mmx_fetch_x8r8g8b8, NULL diff --git a/pixman/pixman-noop.c b/pixman/pixman-noop.c index e5989049..25aa5812 100644 --- a/pixman/pixman-noop.c +++ b/pixman/pixman-noop.c @@ -50,7 +50,7 @@ noop_get_scanline (pixman_iter_t *iter, const uint32_t *mask) static void noop_init_solid_narrow (pixman_iter_t *iter, const pixman_iter_info_t *info) -{ +{ pixman_image_t *image = iter->image; uint32_t *buffer = iter->buffer; uint32_t *end = buffer + iter->width; @@ -154,7 +154,7 @@ _pixman_implementation_create_noop (pixman_implementation_t *fallback) { pixman_implementation_t *imp = _pixman_implementation_create (fallback, noop_fast_paths); - + imp->iter_info = noop_iters; return imp; diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c index 771a3a36..27c1416a 100644 --- a/pixman/pixman-radial-gradient.c +++ b/pixman/pixman-radial-gradient.c @@ -175,7 +175,7 @@ radial_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask) * radial gradients, see the long comment in pixman-float.c * at the beginning of float_get_src_scanline_radial(). */ - + /* reference point is the center of the pixel */ v.vector[0] = pixman_int_to_fixed (x) + pixman_fixed_1 / 2; v.vector[1] = pixman_int_to_fixed (y) + pixman_fixed_1 / 2; diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 59bc9c79..042dac1a 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -1,31 +1,31 @@ /* * Copyright 1987, 1988, 1989, 1998 The Open Group - * + * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation. - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * + * * Except as contained in this notice, the name of The Open Group shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from The Open Group. - * + * * Copyright 1987, 1988, 1989 by * Digital Equipment Corporation, Maynard, Massachusetts. - * + * * All Rights Reserved - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice appear in all copies and that @@ -33,7 +33,7 @@ * supporting documentation, and that the name of Digital not be * used in advertising or publicity pertaining to distribution of the * software without specific, written prior permission. - * + * * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR @@ -192,7 +192,7 @@ static size_t PIXREGION_SZOF (size_t n) { size_t size = n * sizeof(box_type_t); - + if (n > UINT32_MAX / sizeof(box_type_t)) return 0; @@ -300,22 +300,22 @@ PREFIX (_equal) (region_type_t *reg1, region_type_t *reg2) if (reg1->extents.x1 != reg2->extents.x1) return FALSE; - + if (reg1->extents.x2 != reg2->extents.x2) return FALSE; - + if (reg1->extents.y1 != reg2->extents.y1) return FALSE; - + if (reg1->extents.y2 != reg2->extents.y2) return FALSE; - + if (PIXREGION_NUMRECTS (reg1) != PIXREGION_NUMRECTS (reg2)) return FALSE; rects1 = PIXREGION_RECTS (reg1); rects2 = PIXREGION_RECTS (reg2); - + for (i = 0; i != PIXREGION_NUMRECTS (reg1); i++) { if (rects1[i].x1 != rects2[i].x1) @@ -351,13 +351,13 @@ PREFIX (_print) (region_type_t *rgn) rgn->extents.y1, rgn->extents.x2, rgn->extents.y2); - + for (i = 0; i < num; i++) { fprintf (stderr, "%d %d %d %d \n", rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); } - + fprintf (stderr, "\n"); return(num); @@ -498,7 +498,7 @@ pixman_rect_alloc (region_type_t * region, region->data = data; } - + region->data->size = n; return TRUE; @@ -512,7 +512,7 @@ PREFIX (_copy) (region_type_t *dst, region_type_t *src) if (dst == src) return TRUE; - + dst->extents = src->extents; if (!src->data || !src->data->size) @@ -521,7 +521,7 @@ PREFIX (_copy) (region_type_t *dst, region_type_t *src) dst->data = src->data; return TRUE; } - + if (!dst->data || (dst->data->size < src->data->numRects)) { FREE_DATA (dst); @@ -750,7 +750,7 @@ pixman_op (region_type_t * new_reg, /* Place to store result region_type_t * reg2, /* 2d region in operation */ overlap_proc_ptr overlap_func, /* Function to call for over- * lapping bands */ - int append_non1, /* Append non-overlapping bands + int append_non1, /* Append non-overlapping bands * in region 1 ? */ int append_non2 /* Append non-overlapping bands @@ -799,7 +799,7 @@ pixman_op (region_type_t * new_reg, /* Place to store result numRects = PIXREGION_NUMRECTS (reg2); r2 = PIXREGION_RECTS (reg2); r2_end = r2 + numRects; - + critical_if_fail (r1 != r1_end); critical_if_fail (r2 != r2_end); @@ -938,7 +938,7 @@ pixman_op (region_type_t * new_reg, /* Place to store result { goto bail; } - + COALESCE (new_reg, prev_band, cur_band); } @@ -1444,7 +1444,7 @@ PREFIX (_union) (region_type_t *new_reg, new_reg->extents.y1 = MIN (reg1->extents.y1, reg2->extents.y1); new_reg->extents.x2 = MAX (reg1->extents.x2, reg2->extents.x2); new_reg->extents.y2 = MAX (reg1->extents.y2, reg2->extents.y2); - + GOOD (new_reg); return TRUE; @@ -1513,7 +1513,7 @@ quick_sort_rects ( j--; } while (y1 < r->y1 || (y1 == r->y1 && x1 < r->x1)); - + if (i < j) EXCHANGE_RECTS (i, j); } @@ -1595,7 +1595,7 @@ validate (region_type_t * badreg) GOOD (badreg); return TRUE; } - + numRects = badreg->data->numRects; if (!numRects) { @@ -1604,7 +1604,7 @@ validate (region_type_t * badreg) GOOD (badreg); return TRUE; } - + if (badreg->extents.x1 < badreg->extents.x2) { if ((numRects) == 1) @@ -1961,7 +1961,7 @@ PREFIX (_subtract) (region_type_t *reg_d, GOOD (reg_m); GOOD (reg_s); GOOD (reg_d); - + /* check for trivial rejects */ if (PIXREGION_NIL (reg_m) || PIXREGION_NIL (reg_s) || !EXTENTCHECK (®_m->extents, ®_s->extents)) @@ -2027,7 +2027,7 @@ PREFIX (_inverse) (region_type_t *new_reg, /* Destination region */ * bounding box */ GOOD (reg1); GOOD (new_reg); - + /* check for trivial rejects */ if (PIXREGION_NIL (reg1) || !EXTENTCHECK (inv_rect, ®1->extents)) { @@ -2233,7 +2233,7 @@ PREFIX (_translate) (region_type_t *region, int x, int y) region->extents.y1 = y1 = region->extents.y1 + y; region->extents.x2 = x2 = region->extents.x2 + x; region->extents.y2 = y2 = region->extents.y2 + y; - + if (((x1 - PIXMAN_REGION_MIN) | (y1 - PIXMAN_REGION_MIN) | (PIXMAN_REGION_MAX - x2) | (PIXMAN_REGION_MAX - y2)) >= 0) { if (region->data && (nbox = region->data->numRects)) @@ -2451,10 +2451,10 @@ PREFIX (_selfcheck) (region_type_t *reg) if (pbox_n->x1 < box.x1) box.x1 = pbox_n->x1; - + if (pbox_n->x2 > box.x2) box.x2 = pbox_n->x2; - + if ((pbox_n->y1 < pbox_p->y1) || ((pbox_n->y1 == pbox_p->y1) && ((pbox_n->x1 < pbox_p->x2) || (pbox_n->y2 != pbox_p->y2)))) diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c index 89551037..be4e9717 100644 --- a/pixman/pixman-sse2.c +++ b/pixman/pixman-sse2.c @@ -2944,17 +2944,17 @@ sse2_composite_src_x888_8888 (pixman_implementation_t *imp, while (w >= 16) { __m128i xmm_src1, xmm_src2, xmm_src3, xmm_src4; - + xmm_src1 = load_128_unaligned ((__m128i*)src + 0); xmm_src2 = load_128_unaligned ((__m128i*)src + 1); xmm_src3 = load_128_unaligned ((__m128i*)src + 2); xmm_src4 = load_128_unaligned ((__m128i*)src + 3); - + save_128_aligned ((__m128i*)dst + 0, _mm_or_si128 (xmm_src1, mask_ff000000)); save_128_aligned ((__m128i*)dst + 1, _mm_or_si128 (xmm_src2, mask_ff000000)); save_128_aligned ((__m128i*)dst + 2, _mm_or_si128 (xmm_src3, mask_ff000000)); save_128_aligned ((__m128i*)dst + 3, _mm_or_si128 (xmm_src4, mask_ff000000)); - + dst += 16; src += 16; w -= 16; @@ -4195,7 +4195,7 @@ sse2_composite_in_n_8 (pixman_implementation_t *imp, xmm_dst = load_128_aligned ((__m128i*)dst); unpack_128_2x128 (xmm_dst, &xmm_dst_lo, &xmm_dst_hi); - + pix_multiply_2x128 (&xmm_alpha, &xmm_alpha, &xmm_dst_lo, &xmm_dst_hi, &xmm_dst_lo, &xmm_dst_hi); @@ -6228,7 +6228,7 @@ static const pixman_fast_path_t sse2_fast_paths[] = PIXMAN_STD_FAST_PATH (OVER, rpixbuf, rpixbuf, b5g6r5, sse2_composite_over_pixbuf_0565), PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, null, x8r8g8b8, sse2_composite_copy_area), PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, null, x8b8g8r8, sse2_composite_copy_area), - + /* PIXMAN_OP_OVER_REVERSE */ PIXMAN_STD_FAST_PATH (OVER_REVERSE, solid, null, a8r8g8b8, sse2_composite_over_reverse_n_8888), PIXMAN_STD_FAST_PATH (OVER_REVERSE, solid, null, a8b8g8r8, sse2_composite_over_reverse_n_8888), @@ -6448,7 +6448,7 @@ sse2_fetch_a8 (pixman_iter_t *iter, const uint32_t *mask) (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM | \ FAST_PATH_BITS_IMAGE | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST) -static const pixman_iter_info_t sse2_iters[] = +static const pixman_iter_info_t sse2_iters[] = { { PIXMAN_x8r8g8b8, IMAGE_FLAGS, ITER_NARROW, _pixman_iter_init_bits_stride, sse2_fetch_x8r8g8b8, NULL diff --git a/pixman/pixman-ssse3.c b/pixman/pixman-ssse3.c index 680d6b95..e889a221 100644 --- a/pixman/pixman-ssse3.c +++ b/pixman/pixman-ssse3.c @@ -12,7 +12,7 @@ * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -77,7 +77,7 @@ ssse3_fetch_horizontal (bits_image_t *image, line_t *line, (__m128i *)(bits + pixman_fixed_to_int (x))); /* vrl0: R0, L0 */ - /* The weights are based on vx which is a vector of + /* The weights are based on vx which is a vector of * * - (x + 1), x, - (x + 1), x, * - (x + ux + 1), x + ux, - (x + ux + 1), x + ux @@ -91,7 +91,7 @@ ssse3_fetch_horizontal (bits_image_t *image, line_t *line, * iw0, w0, iw0, w0, iw1, w1, iw1, w1, * iw0, w0, iw0, w0, iw1, w1, iw1, w1, * - * which means the first and the second input pixel + * which means the first and the second input pixel * have to be interleaved like this: * * la0, ra0, lr0, rr0, la1, ra1, lr1, rr1, @@ -256,7 +256,7 @@ ssse3_fetch_bilinear_cover (pixman_iter_t *iter, const uint32_t *mask) i += 2; } } - + info->y += iter->image->common.transform->matrix[1][1]; return iter->buffer; @@ -314,12 +314,12 @@ fail: */ _pixman_log_error ( FUNC, "Allocation failure or bad matrix, skipping rendering\n"); - + iter->get_scanline = _pixman_iter_get_scanline_noop; iter->fini = NULL; } -static const pixman_iter_info_t ssse3_iters[] = +static const pixman_iter_info_t ssse3_iters[] = { { PIXMAN_a8r8g8b8, (FAST_PATH_STANDARD_FLAGS | diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c index 91766fdb..c645a533 100644 --- a/pixman/pixman-trap.c +++ b/pixman/pixman-trap.c @@ -42,7 +42,7 @@ pixman_sample_ceil_y (pixman_fixed_t y, int n) f = DIV (f - Y_FRAC_FIRST (n) + (STEP_Y_SMALL (n) - pixman_fixed_e), STEP_Y_SMALL (n)) * STEP_Y_SMALL (n) + Y_FRAC_FIRST (n); - + if (f > Y_FRAC_LAST (n)) { if (pixman_fixed_to_int (i) == 0x7fff) @@ -221,7 +221,7 @@ pixman_line_fixed_edge_init (pixman_edge_t * e, top = &line->p2; bot = &line->p1; } - + pixman_edge_init (e, n, y, top->x + x_off_fixed, top->y + y_off_fixed, @@ -245,7 +245,7 @@ pixman_add_traps (pixman_image_t * image, pixman_fixed_t t, b; _pixman_image_validate (image); - + height = image->bits.height; bpp = PIXMAN_FORMAT_BPP (image->bits.format); @@ -358,7 +358,7 @@ pixman_rasterize_trapezoid (pixman_image_t * image, return_if_fail (image->type == BITS); _pixman_image_validate (image); - + if (!pixman_trapezoid_valid (trap)) return; @@ -376,7 +376,7 @@ pixman_rasterize_trapezoid (pixman_image_t * image, if (pixman_fixed_to_int (b) >= height) b = pixman_int_to_fixed (height) - 1; b = pixman_sample_floor_y (b, bpp); - + if (b >= t) { /* initialize edge walkers */ @@ -423,7 +423,7 @@ get_trap_extents (pixman_op_t op, pixman_image_t *dest, box->y2 = dest->bits.height; return TRUE; } - + box->x1 = INT32_MAX; box->y1 = INT32_MAX; box->x2 = INT32_MIN; @@ -433,29 +433,29 @@ get_trap_extents (pixman_op_t op, pixman_image_t *dest, { const pixman_trapezoid_t *trap = &(traps[i]); int y1, y2; - + if (!pixman_trapezoid_valid (trap)) continue; - + y1 = pixman_fixed_to_int (trap->top); if (y1 < box->y1) box->y1 = y1; - + y2 = pixman_fixed_to_int (pixman_fixed_ceil (trap->bottom)); if (y2 > box->y2) box->y2 = y2; - + #define EXTEND_MIN(x) \ if (pixman_fixed_to_int ((x)) < box->x1) \ box->x1 = pixman_fixed_to_int ((x)); #define EXTEND_MAX(x) \ if (pixman_fixed_to_int (pixman_fixed_ceil ((x))) > box->x2) \ box->x2 = pixman_fixed_to_int (pixman_fixed_ceil ((x))); - + #define EXTEND(x) \ EXTEND_MIN(x); \ EXTEND_MAX(x); - + EXTEND(trap->left.p1.x); EXTEND(trap->left.p2.x); EXTEND(trap->right.p1.x); @@ -492,7 +492,7 @@ pixman_composite_trapezoids (pixman_op_t op, int i; return_if_fail (PIXMAN_FORMAT_TYPE (mask_format) == PIXMAN_TYPE_A); - + if (n_traps <= 0) return; @@ -507,10 +507,10 @@ pixman_composite_trapezoids (pixman_op_t op, for (i = 0; i < n_traps; ++i) { const pixman_trapezoid_t *trap = &(traps[i]); - + if (!pixman_trapezoid_valid (trap)) continue; - + pixman_rasterize_trapezoid (dst, trap, x_dst, y_dst); } } @@ -530,10 +530,10 @@ pixman_composite_trapezoids (pixman_op_t op, for (i = 0; i < n_traps; ++i) { const pixman_trapezoid_t *trap = &(traps[i]); - + if (!pixman_trapezoid_valid (trap)) continue; - + pixman_rasterize_trapezoid (tmp, trap, - box.x1, - box.y1); } @@ -604,7 +604,7 @@ triangle_to_trapezoids (const pixman_triangle_t *tri, pixman_trapezoid_t *traps) right = left; left = tmp; } - + /* * Two cases: * @@ -632,7 +632,7 @@ triangle_to_trapezoids (const pixman_triangle_t *tri, pixman_trapezoid_t *traps) traps++; *traps = *(traps - 1); - + if (right->y < left->y) { traps->top = right->y; @@ -657,7 +657,7 @@ convert_triangles (int n_tris, const pixman_triangle_t *tris) if (n_tris <= 0) return NULL; - + traps = pixman_malloc_ab (n_tris, 2 * sizeof (pixman_trapezoid_t)); if (!traps) return NULL; diff --git a/pixman/pixman.c b/pixman/pixman.c index f932eac3..d417eb96 100644 --- a/pixman/pixman.c +++ b/pixman/pixman.c @@ -140,9 +140,9 @@ optimize_operator (pixman_op_t op, pixman_bool_t is_source_opaque, is_dest_opaque; #define OPAQUE_SHIFT 13 - + COMPILE_TIME_ASSERT (FAST_PATH_IS_OPAQUE == (1 << OPAQUE_SHIFT)); - + is_dest_opaque = (dst_flags & FAST_PATH_IS_OPAQUE); is_source_opaque = ((src_flags & mask_flags) & FAST_PATH_IS_OPAQUE); @@ -464,7 +464,7 @@ analyze_extent (pixman_image_t *image, width = params[0]; height = params[1]; break; - + case PIXMAN_FILTER_GOOD: case PIXMAN_FILTER_BEST: case PIXMAN_FILTER_BILINEAR: @@ -528,7 +528,7 @@ analyze_extent (pixman_image_t *image, if (!compute_transformed_extents (transform, &exp_extents, &transformed)) return FALSE; - + if (!IS_16_16 (transformed.x1 + x_off - 8 * pixman_fixed_e) || !IS_16_16 (transformed.y1 + y_off - 8 * pixman_fixed_e) || !IS_16_16 (transformed.x2 + x_off + 8 * pixman_fixed_e + width) || @@ -720,7 +720,7 @@ pixman_image_composite (pixman_op_t op, uint16_t width, uint16_t height) { - pixman_image_composite32 (op, src, mask, dest, src_x, src_y, + pixman_image_composite32 (op, src, mask, dest, src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height); } @@ -862,7 +862,7 @@ pixman_image_fill_rectangles (pixman_op_t op, if (boxes != stack_boxes) free (boxes); - + return result; } @@ -878,7 +878,7 @@ pixman_image_fill_boxes (pixman_op_t op, int i; _pixman_image_validate (dest); - + if (color->alpha == 0xffff) { if (op == PIXMAN_OP_OVER) |