diff options
author | marha <marha@users.sourceforge.net> | 2009-10-05 15:13:41 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-05 15:13:41 +0000 |
commit | 78db264e7992131e0781bdfa5ede821305262b2d (patch) | |
tree | 7461ae9dab5bf69f056250fc233c1ada393dc957 /pixman/pixman | |
parent | 1d2fa791e7eb383cf2818bb2e33da546edbeade9 (diff) | |
parent | 77a4732b0637493966889fe3545966fdc12a1b5e (diff) | |
download | vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.gz vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.bz2 vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'pixman/pixman')
-rw-r--r-- | pixman/pixman/pixman-access.c | 30 | ||||
-rw-r--r-- | pixman/pixman/pixman-arm-neon.c | 10 | ||||
-rw-r--r-- | pixman/pixman/pixman-bits-image.c | 10 | ||||
-rw-r--r-- | pixman/pixman/pixman-cpu.c | 2 | ||||
-rw-r--r-- | pixman/pixman/pixman-fast-path.c | 8 | ||||
-rw-r--r-- | pixman/pixman/pixman-image.c | 6 | ||||
-rw-r--r-- | pixman/pixman/pixman-sse2.c | 12 | ||||
-rw-r--r-- | pixman/pixman/pixman-version.h | 4 | ||||
-rw-r--r-- | pixman/pixman/pixman.h | 2 |
9 files changed, 46 insertions, 38 deletions
diff --git a/pixman/pixman/pixman-access.c b/pixman/pixman/pixman-access.c index 532aa2ef7..d9fd38c15 100644 --- a/pixman/pixman/pixman-access.c +++ b/pixman/pixman/pixman-access.c @@ -230,7 +230,7 @@ fetch_scanline_a2r10g10b10 (pixman_image_t *image, const uint32_t *pixel = bits + x; const uint32_t *end = pixel + width; uint64_t *buffer = (uint64_t *)b; - + while (pixel < end) { uint32_t p = READ (image, pixel++); @@ -238,16 +238,16 @@ fetch_scanline_a2r10g10b10 (pixman_image_t *image, uint64_t r = (p >> 20) & 0x3ff; uint64_t g = (p >> 10) & 0x3ff; uint64_t b = p & 0x3ff; - + r = r << 6 | r >> 4; g = g << 6 | g >> 4; b = b << 6 | b >> 4; - - a <<= 62; + + a <<= 14; a |= a >> 2; a |= a >> 4; a |= a >> 8; - + *buffer++ = a << 48 | r << 32 | g << 16 | b; } } @@ -309,11 +309,11 @@ fetch_scanline_a2b10g10r10 (pixman_image_t *image, g = g << 6 | g >> 4; b = b << 6 | b >> 4; - a <<= 62; + a <<= 14; a |= a >> 2; a |= a >> 4; a |= a >> 8; - + *buffer++ = a << 48 | r << 32 | g << 16 | b; } } @@ -1115,18 +1115,18 @@ fetch_scanline_yv12 (pixman_image_t *image, { int16_t y, u, v; int32_t r, g, b; - + y = y_line[x + i] - 16; u = u_line[(x + i) >> 1] - 128; v = v_line[(x + i) >> 1] - 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; - + *buffer++ = 0xff000000 | (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) | (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) | @@ -1148,16 +1148,16 @@ fetch_pixel_a2r10g10b10 (bits_image_t *image, uint64_t r = (p >> 20) & 0x3ff; uint64_t g = (p >> 10) & 0x3ff; uint64_t b = p & 0x3ff; - + r = r << 6 | r >> 4; g = g << 6 | g >> 4; b = b << 6 | b >> 4; - - a <<= 62; + + a <<= 14; a |= a >> 2; a |= a >> 4; a |= a >> 8; - + return a << 48 | r << 32 | g << 16 | b; } @@ -1197,7 +1197,7 @@ fetch_pixel_a2b10g10r10 (bits_image_t *image, g = g << 6 | g >> 4; b = b << 6 | b >> 4; - a <<= 62; + a <<= 14; a |= a >> 2; a |= a >> 4; a |= a >> 8; diff --git a/pixman/pixman/pixman-arm-neon.c b/pixman/pixman/pixman-arm-neon.c index 4125d1b0c..8a2d72ea3 100644 --- a/pixman/pixman/pixman-arm-neon.c +++ b/pixman/pixman/pixman-arm-neon.c @@ -64,6 +64,12 @@ unpack0565 (uint16x8_t rgb) return res; } +#ifdef USE_GCC_INLINE_ASM +/* Some versions of gcc have problems with vshll_n_u8 intrinsic (Bug 23576) */ +#define vshll_n_u8(a, n) ({ uint16x8_t r; \ + asm ("vshll.u8 %q0, %P1, %2\n" : "=w" (r) : "w" (a), "i" (n)); r; }) +#endif + static force_inline uint16x8_t pack0565 (uint8x8x4_t s) { @@ -2761,8 +2767,8 @@ arm_neon_fill (pixman_implementation_t *imp, pixman_implementation_t * _pixman_implementation_create_arm_neon (void) { - pixman_implementation_t *simd = _pixman_implementation_create_arm_simd (); - pixman_implementation_t *imp = _pixman_implementation_create (simd); + pixman_implementation_t *general = _pixman_implementation_create_fast_path (); + pixman_implementation_t *imp = _pixman_implementation_create (general); imp->composite = arm_neon_composite; #if 0 /* this code has some bugs */ diff --git a/pixman/pixman/pixman-bits-image.c b/pixman/pixman/pixman-bits-image.c index 6b8018985..4e78ce107 100644 --- a/pixman/pixman/pixman-bits-image.c +++ b/pixman/pixman/pixman-bits-image.c @@ -612,14 +612,14 @@ source_image_needs_out_of_bounds_workaround (bits_image_t *image) { if (!image->common.client_clip) { - /* There is no client clip, so the drawable in question - * is a window if the clip region extends beyond the - * drawable geometry. + /* There is no client clip, so if the clip region extends beyond the + * drawable geometry, it must be because the X server generated the + * bogus clip region. */ const pixman_box32_t *extents = pixman_region32_extents (&image->common.clip_region); - if (extents->x1 >= 0 && extents->x2 < image->width && - extents->y1 >= 0 && extents->y2 < image->height) + if (extents->x1 >= 0 && extents->x2 <= image->width && + extents->y1 >= 0 && extents->y2 <= image->height) { return FALSE; } diff --git a/pixman/pixman/pixman-cpu.c b/pixman/pixman/pixman-cpu.c index a2a7b8a1a..5d5469bb8 100644 --- a/pixman/pixman/pixman-cpu.c +++ b/pixman/pixman/pixman-cpu.c @@ -325,7 +325,7 @@ pixman_have_arm_neon (void) * that would lead to SIGILL instructions on old CPUs that don't have * it. */ -#if !defined(__amd64__) && !defined(__x86_64__) +#if !defined(__amd64__) && !defined(__x86_64__) && !defined(_M_AMD64) #ifdef HAVE_GETISAX #include <sys/auxv.h> diff --git a/pixman/pixman/pixman-fast-path.c b/pixman/pixman/pixman-fast-path.c index 7f805780f..5ab8d8c99 100644 --- a/pixman/pixman/pixman-fast-path.c +++ b/pixman/pixman/pixman-fast-path.c @@ -389,15 +389,11 @@ fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp, { ma = *mask++; - if (ma == 0xffffffff && srca == 0xff) - { - *dst = src; - } - else if (ma) + if (ma) { d = *dst; s = src; - + UN8x4_MUL_UN8x4_ADD_UN8x4 (s, ma, d); *dst = s; diff --git a/pixman/pixman/pixman-image.c b/pixman/pixman/pixman-image.c index 583195377..bba5fd68c 100644 --- a/pixman/pixman/pixman-image.c +++ b/pixman/pixman/pixman-image.c @@ -312,7 +312,7 @@ pixman_image_set_transform (pixman_image_t * image, { { { pixman_fixed_1, 0, 0 }, { 0, pixman_fixed_1, 0 }, - { 0, 0, pixman_fixed_1 }} + { 0, 0, pixman_fixed_1 } } }; image_common_t *common = (image_common_t *)image; @@ -342,10 +342,12 @@ pixman_image_set_transform (pixman_image_t * image, memcpy (common->transform, transform, sizeof(pixman_transform_t)); + result = TRUE; + out: image_property_changed (image); - return TRUE; + return result; } PIXMAN_EXPORT void diff --git a/pixman/pixman/pixman-sse2.c b/pixman/pixman/pixman-sse2.c index 727ad42ec..bb74882b2 100644 --- a/pixman/pixman/pixman-sse2.c +++ b/pixman/pixman/pixman-sse2.c @@ -359,13 +359,13 @@ in_over_2x128 (__m128i* src_lo, static force_inline void cache_prefetch (__m128i* addr) { - _mm_prefetch (addr, _MM_HINT_T0); + _mm_prefetch ((void const*)addr, _MM_HINT_T0); } static force_inline void cache_prefetch_next (__m128i* addr) { - _mm_prefetch (addr + 4, _MM_HINT_T0); /* 64 bytes ahead */ + _mm_prefetch ((void const *)(addr + 4), _MM_HINT_T0); /* 64 bytes ahead */ } /* load 4 pixels from a 16-byte boundary aligned address */ @@ -2628,12 +2628,18 @@ create_mask_2x32_64 (uint32_t mask0, return _mm_set_pi32 (mask0, mask1); } +/* Work around a code generation bug in Sun Studio 12. */ +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +# define create_mask_2x32_128(mask0, mask1) \ + (_mm_set_epi32 ((mask0), (mask1), (mask0), (mask1))) +#else static force_inline __m128i create_mask_2x32_128 (uint32_t mask0, uint32_t mask1) { return _mm_set_epi32 (mask0, mask1, mask0, mask1); } +#endif /* SSE2 code patch for fbcompose.c */ @@ -5600,7 +5606,7 @@ static const pixman_fast_path_t sse2_fast_paths[] = { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_x8b8g8r8, sse2_composite_over_x888_8_8888, 0 }, - { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_8_8888, 0 }, + { PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, PIXMAN_a8, PIXMAN_a8b8g8r8, sse2_composite_over_x888_8_8888, 0 }, #endif { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_a8r8g8b8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, { PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, PIXMAN_a8, PIXMAN_x8r8g8b8, sse2_composite_over_x888_n_8888, NEED_SOLID_MASK }, diff --git a/pixman/pixman/pixman-version.h b/pixman/pixman/pixman-version.h index 65df97052..79d74fed4 100644 --- a/pixman/pixman/pixman-version.h +++ b/pixman/pixman/pixman-version.h @@ -33,9 +33,9 @@ #define PIXMAN_VERSION_MAJOR 0 #define PIXMAN_VERSION_MINOR 16 -#define PIXMAN_VERSION_MICRO 0 +#define PIXMAN_VERSION_MICRO 2 -#define PIXMAN_VERSION_STRING "0.16.0" +#define PIXMAN_VERSION_STRING "0.16.2" #define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \ ((major) * 10000) \ diff --git a/pixman/pixman/pixman.h b/pixman/pixman/pixman.h index 969d42702..5b90a0c8d 100644 --- a/pixman/pixman/pixman.h +++ b/pixman/pixman/pixman.h @@ -222,8 +222,6 @@ pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform const struct pixman_f_transform *ft); void pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft, const struct pixman_transform *t); -pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform *t, - const struct pixman_f_transform *ft); pixman_bool_t pixman_f_transform_invert (struct pixman_f_transform *dst, const struct pixman_f_transform *src); pixman_bool_t pixman_f_transform_point (const struct pixman_f_transform *t, |