aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
Diffstat (limited to 'pixman')
-rw-r--r--pixman/pixman/config.h229
-rw-r--r--pixman/pixman/makefile59
-rw-r--r--pixman/pixman/pixman-compiler.h18
-rw-r--r--pixman/pixman/pixman-inlines.h1
-rw-r--r--pixman/pixman/pixman-mmx.c89
-rw-r--r--pixman/pixman/pixman-sse2.c14
-rw-r--r--pixman/pixman/pixman-trap.c2
-rw-r--r--pixman/pixman/pixman-version.h50
8 files changed, 421 insertions, 41 deletions
diff --git a/pixman/pixman/config.h b/pixman/pixman/config.h
new file mode 100644
index 000000000..b16bc8da4
--- /dev/null
+++ b/pixman/pixman/config.h
@@ -0,0 +1,229 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Include compose table cache support */
+#define COMPOSECACHE 1
+
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define HAVE_ENDIAN_H 1
+
+/* Use dlopen to load shared libraries */
+#define HAVE_DLOPEN 1
+
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* launchd support available */
+/* #undef HAVE_LAUNCHD */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `poll' function. */
+#define HAVE_POLL 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Use shl_load to load shared libraries */
+/* #undef HAVE_SHL_LOAD */
+
+/* Define to 1 if the system has the type `socklen_t'. */
+#define HAVE_SOCKLEN_T 0
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#define HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Support IPv6 for TCP connections */
+/* #undef IPv6 */
+
+/* Support dynamically loaded font modules */
+#define LOADABLEFONTS 1
+
+/* Support os-specific local connections */
+/* #undef LOCALCONN */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Disable XLOCALEDIR environment variable */
+#define NO_XLOCALEDIR 1
+
+/* Name of package */
+#define PACKAGE "pixman"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""sandmann@daimi.au.dk""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "pixman"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "pixman 0.19.1"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "pixman"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.19.1"
+
+/* Major version of this package */
+#define PACKAGE_VERSION_MAJOR 0
+
+/* Minor version of this package */
+#define PACKAGE_VERSION_MINOR 19
+
+/* Patch version of this package */
+#define PACKAGE_VERSION_PATCHLEVEL 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Support TCP socket connections */
+#define TCPCONN 1
+
+/* launchd support available */
+/* #undef TRANS_REOPEN */
+
+/* use MMX compiler intrinsics */
+#define USE_X86_MMX 1
+
+/* Support UNIX socket connections */
+#define UNIXCONN 1
+
+/* Split some i18n functions into loadable modules */
+/* #undef USE_DYNAMIC_LC */
+
+/* Use the X cursor library to load cursors */
+#define USE_DYNAMIC_XCURSOR 1
+
+/* use SSE2 compiler intrinsics */
+#define USE_SSE2 1
+
+/* use VMX compiler intrinsics */
+#undef USE_VMX
+
+/* poll() function is available */
+#define USE_POLL 1
+
+/* Use XCB for low-level protocol implementation */
+#define USE_XCB 1
+
+/* Version number of package */
+#define VERSION "0.15.18"
+
+/* Support bdf format bitmap font files */
+#define XFONT_BDFFORMAT 1
+
+/* Location of libX11 data */
+#define X11_DATADIR "/usr/share/X11"
+
+/* Location of libX11 library data */
+#define X11_LIBDIR "/usr/lib/X11"
+
+/* Include support for XCMS */
+#define XCMS 1
+
+/* Location of error message database */
+#define XERRORDB "XErrorDB"
+
+/* Enable XF86BIGFONT extension */
+/* #undef XF86BIGFONT */
+
+/* Use XKB */
+#define XKB 1
+
+/* Location of keysym database */
+#define XKEYSYMDB "XKeysymDB"
+
+/* support for X Locales */
+#define XLOCALE 1
+
+/* Location of libX11 locale data */
+#define XLOCALEDATADIR "locale"
+
+/* Location of libX11 locale data */
+#define XLOCALEDIR "locale"
+
+/* Location of libX11 locale libraries */
+#define XLOCALELIBDIR "locale"
+
+/* Whether libX11 is compiled with thread support */
+#define XTHREADS /**/
+
+/* Whether libX11 needs to use MT safe API's */
+#define XUSE_MTSAFE_API /**/
+
+/* Enable GNU and other extensions to the C environment for glibc */
+/* #undef _GNU_SOURCE */
+
+/* Support bitmap font files */
+#define XFONT_BITMAP 1
+
+/* Support built-in fonts */
+#define XFONT_BUILTINS 1
+
+/* Support the X Font Services Protocol */
+#define XFONT_FC 1
+
+/* Support fonts in files */
+#define XFONT_FONTFILE 1
+
+/* Support FreeType rasterizer for nearly all font file formats */
+#define XFONT_FREETYPE 1
+
+/* Support pcf format bitmap font files */
+#define XFONT_PCFFORMAT 1
+
+/* Support snf format bitmap font files */
+#define XFONT_SNFFORMAT 1
+
+/* Support Speedo font files */
+#define XFONT_SPEEDO 1
+
+/* Support IBM Type 1 rasterizer for Type1 font files */
+#define XFONT_TYPE1 1
+
+/* Support bzip2 for bitmap fonts */
+/* #undef X_BZIP2_FONT_COMPRESSION */
+
+/* Support gzip for bitmap fonts */
+#define X_GZIP_FONT_COMPRESSION 1
+
+#define __inline__ __inline \ No newline at end of file
diff --git a/pixman/pixman/makefile b/pixman/pixman/makefile
new file mode 100644
index 000000000..1ec9b8e16
--- /dev/null
+++ b/pixman/pixman/makefile
@@ -0,0 +1,59 @@
+LIBRARY = libpixman-1
+
+INCLUDES += $(OBJDIR)
+
+CSRCS = \
+ pixman.c \
+ pixman-access.c \
+ pixman-access-accessors.c \
+ pixman-bits-image.c \
+ pixman-combine32.c \
+ pixman-combine64.c \
+ pixman-conical-gradient.c \
+ pixman-x86.c \
+ pixman-mips.c \
+ pixman-arm.c \
+ pixman-ppc.c \
+ pixman-edge.c \
+ pixman-edge-accessors.c \
+ pixman-fast-path.c \
+ pixman-glyph.c \
+ pixman-general.c \
+ pixman-gradient-walker.c \
+ pixman-image.c \
+ pixman-implementation.c \
+ pixman-linear-gradient.c \
+ pixman-matrix.c \
+ pixman-noop.c \
+ pixman-radial-gradient.c \
+ pixman-region16.c \
+ pixman-region32.c \
+ pixman-solid-fill.c \
+ pixman-timer.c \
+ pixman-trap.c \
+ pixman-utils.c \
+ $(NULL)
+
+BUILT_SOURCES = \
+ pixman-combine32.c \
+ pixman-combine32.h \
+ pixman-combine64.c \
+ pixman-combine64.h \
+ $(NULL)
+
+$(OBJDIR)\pixman-combine32.c : pixman-combine.c.template $(OBJDIR)\pixman-combine32.h make-combine.pl
+ perl make-combine.pl 8 < pixman-combine.c.template > $@
+$(OBJDIR)\pixman-combine32.h : pixman-combine.h.template make-combine.pl
+ perl make-combine.pl 8 < pixman-combine.h.template > $@
+
+$(OBJDIR)\pixman-combine64.c : pixman-combine.c.template $(OBJDIR)\pixman-combine64.h make-combine.pl
+ perl make-combine.pl 16 < pixman-combine.c.template > $@
+$(OBJDIR)\pixman-combine64.h : pixman-combine.h.template make-combine.pl
+ perl make-combine.pl 16 < pixman-combine.h.template > $@
+
+## mmx code
+CSRCS += pixman-mmx.c
+
+# sse2 code
+CSRCS += pixman-sse2.c
+
diff --git a/pixman/pixman/pixman-compiler.h b/pixman/pixman/pixman-compiler.h
index a978accfd..2c9df716e 100644
--- a/pixman/pixman/pixman-compiler.h
+++ b/pixman/pixman/pixman-compiler.h
@@ -108,10 +108,22 @@
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
-#elif defined(__MINGW32__)
+#elif defined(__MINGW32__) && !defined(__WIN64)
-# define _NO_W32_PSEUDO_MODIFIERS
-# include <windows.h>
+/* We can't include <windows.h> as it causes carious clashes with
+ * identifiers in pixman, sigh. So just declare the functions we need
+ * here.
+ */
+extern long __stdcall InterlockedCompareExchange(long volatile *, long, long);
+#define InterlockedCompareExchangePointer(d,e,c) \
+ (void *)InterlockedCompareExchange((long volatile *)(d),(long)(e),(long)(c))
+extern int __stdcall TlsAlloc (void);
+extern void * __stdcall TlsGetValue (unsigned);
+extern int __stdcall TlsSetValue (unsigned, void *);
+extern void * __stdcall CreateMutexA(void *, int, char *);
+extern int __stdcall CloseHandle(void *);
+extern unsigned __stdcall WaitForSingleObject (void *, unsigned);
+extern int __stdcall ReleaseMutex (void *);
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
static volatile int tls_ ## name ## _initialized = 0; \
diff --git a/pixman/pixman/pixman-inlines.h b/pixman/pixman/pixman-inlines.h
index 5517de5a5..f78bc212f 100644
--- a/pixman/pixman/pixman-inlines.h
+++ b/pixman/pixman/pixman-inlines.h
@@ -1132,6 +1132,7 @@ fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp,
weight1, weight2, vx, unit_x, max_vx, FALSE); \
} \
} \
+ _mm_empty (); \
}
/* A workaround for old sun studio, see: https://bugs.freedesktop.org/show_bug.cgi?id=32764 */
diff --git a/pixman/pixman/pixman-mmx.c b/pixman/pixman/pixman-mmx.c
index 74a5e87a8..dfca50954 100644
--- a/pixman/pixman/pixman-mmx.c
+++ b/pixman/pixman/pixman-mmx.c
@@ -61,7 +61,7 @@ _mm_empty (void)
}
#endif
-#ifdef USE_X86_MMX
+#if defined __GNUC__ && defined USE_X86_MMX
# if (defined(__SUNPRO_C) || defined(_MSC_VER))
# include <xmmintrin.h>
# else
@@ -118,13 +118,17 @@ _mm_shuffle_pi16 (__m64 __A, int8_t const __N)
})
# endif
# endif
-#endif
#ifndef _MSC_VER
#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \
(((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | (fp0))
#endif
+#else
+#include <xmmintrin.h> /* for _mm_shuffle_pi16 and _MM_SHUFFLE */
+#include <emmintrin.h> /* for SSE2 intrinsics */
+#endif
+
/* Notes about writing mmx code
*
* give memory operands as the second operand. If you give it as the
@@ -270,6 +274,9 @@ to_m64 (uint64_t x)
#endif
}
+#ifdef _MSC_VER
+#define to_uint64(arg) arg.M64_MEMBER
+#else
static force_inline uint64_t
to_uint64 (__m64 x)
{
@@ -284,6 +291,7 @@ to_uint64 (__m64 x)
return (uint64_t)x;
#endif
}
+#endif
static force_inline __m64
shift (__m64 v,
@@ -447,6 +455,11 @@ pack8888 (__m64 lo, __m64 hi)
return _mm_packs_pu16 (lo, hi);
}
+#ifdef _MSC_VER
+#define store8888(dest,v) *(dest)=_mm_cvtsi64_si32 (pack8888 (v, _mm_setzero_si64 ()))
+#define store(dest,v) *(dest) = _mm_cvtsi64_si32 (v)
+#else
+
static force_inline void
store (uint32_t *dest, __m64 v)
{
@@ -467,6 +480,7 @@ store8888 (uint32_t *dest, __m64 v)
v = pack8888 (v, _mm_setzero_si64 ());
store (dest, v);
}
+#endif
static force_inline pixman_bool_t
is_equal (__m64 a, __m64 b)
@@ -475,7 +489,9 @@ is_equal (__m64 a, __m64 b)
/* __m64 is double, we can compare directly. */
return a == b;
#else
- return _mm_movemask_pi8 (_mm_cmpeq_pi8 (a, b)) == 0xff;
+ pixman_bool_t ret = _mm_movemask_pi8 (_mm_cmpeq_pi8 (a, b)) == 0xff;
+ _mm_empty();
+ return ret;
#endif
}
@@ -486,15 +502,21 @@ is_opaque (__m64 v)
return is_equal (_mm_and_si64 (v, MC (full_alpha)), MC (full_alpha));
#else
__m64 ffs = _mm_cmpeq_pi8 (v, v);
- return (_mm_movemask_pi8 (_mm_cmpeq_pi8 (v, ffs)) & 0x40);
+ pixman_bool_t ret = (_mm_movemask_pi8 (_mm_cmpeq_pi8 (v, ffs)) & 0x40);
+ _mm_empty();
+ return ret;
#endif
}
+#ifdef _MSC_VER
+#define is_zero(v) is_equal (v, _mm_setzero_si64 ())
+#else
static force_inline pixman_bool_t
is_zero (__m64 v)
{
return is_equal (v, _mm_setzero_si64 ());
}
+#endif
/* Expand 16 bits positioned at @pos (0-3) of a mmx register into
*
@@ -541,7 +563,7 @@ expand565 (__m64 pixel, int pos)
static force_inline void
expand_4xpacked565 (__m64 vin, __m64 *vout0, __m64 *vout1, int full_alpha)
{
- __m64 t0, t1, alpha = _mm_setzero_si64 ();;
+ __m64 t0, t1, alpha = _mm_setzero_si64 ();
__m64 r = _mm_and_si64 (vin, MC (expand_565_r));
__m64 g = _mm_and_si64 (vin, MC (expand_565_g));
__m64 b = _mm_and_si64 (vin, MC (expand_565_b));
@@ -562,6 +584,7 @@ expand_4xpacked565 (__m64 vin, __m64 *vout0, __m64 *vout1, int full_alpha)
*vout0 = _mm_unpacklo_pi16 (t0, t1); /* A1 R1 G1 B1 A0 R0 G0 B0 */
*vout1 = _mm_unpackhi_pi16 (t0, t1); /* A3 R3 G3 B3 A2 R2 G2 B2 */
+ _mm_empty();
}
static force_inline __m64
@@ -588,6 +611,7 @@ expand_4x565 (__m64 vin, __m64 *vout0, __m64 *vout1, __m64 *vout2, __m64 *vout3,
*vout1 = expand8888 (v0, 1);
*vout2 = expand8888 (v1, 0);
*vout3 = expand8888 (v1, 1);
+ _mm_empty();
}
static force_inline __m64
@@ -1890,7 +1914,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp,
vdest = pack_565 (
over (vsrc, expand_alpha (vsrc), vdest), vdest, 0);
- *dst = to_uint64 (vdest);
+ *dst = to_uint64 (vdest)&0xffff;
w--;
dst++;
@@ -1903,13 +1927,14 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp,
{
__m64 vdest = *(__m64 *)dst;
__m64 v0, v1, v2, v3;
+ __m64 vsrc0, vsrc1, vsrc2, vsrc3;
expand_4x565 (vdest, &v0, &v1, &v2, &v3, 0);
- __m64 vsrc0 = load8888 ((src + 0));
- __m64 vsrc1 = load8888 ((src + 1));
- __m64 vsrc2 = load8888 ((src + 2));
- __m64 vsrc3 = load8888 ((src + 3));
+ vsrc0 = load8888 ((src + 0));
+ vsrc1 = load8888 ((src + 1));
+ vsrc2 = load8888 ((src + 2));
+ vsrc3 = load8888 ((src + 3));
v0 = over (vsrc0, expand_alpha (vsrc0), v0);
v1 = over (vsrc1, expand_alpha (vsrc1), v1);
@@ -1933,7 +1958,7 @@ mmx_composite_over_8888_0565 (pixman_implementation_t *imp,
vdest = pack_565 (over (vsrc, expand_alpha (vsrc), vdest), vdest, 0);
- *dst = to_uint64 (vdest);
+ *dst = to_uint64 (vdest) & 0xffff;
w--;
dst++;
@@ -2134,7 +2159,7 @@ pixman_fill_mmx (uint32_t *bits,
if (w >= 2 && ((unsigned long)d & 3))
{
- *(uint16_t *)d = xor;
+ *(uint16_t *)d = (xor & 0xffff);
w -= 2;
d += 2;
}
@@ -2187,7 +2212,7 @@ pixman_fill_mmx (uint32_t *bits,
}
if (w >= 2)
{
- *(uint16_t *)d = xor;
+ *(uint16_t *)d = (xor & 0xffff);
w -= 2;
d += 2;
}
@@ -2455,22 +2480,23 @@ mmx_composite_over_n_8_0565 (pixman_implementation_t *imp,
{
__m64 vdest = *(__m64 *)dst;
__m64 v0, v1, v2, v3;
+ __m64 vm0, vm1, vm2, vm3;
expand_4x565 (vdest, &v0, &v1, &v2, &v3, 0);
- __m64 vm0 = to_m64 (m0);
+ vm0 = to_m64 (m0);
v0 = in_over (vsrc, vsrca, expand_alpha_rev (vm0), v0);
- __m64 vm1 = to_m64 (m1);
+ vm1 = to_m64 (m1);
v1 = in_over (vsrc, vsrca, expand_alpha_rev (vm1), v1);
- __m64 vm2 = to_m64 (m2);
+ vm2 = to_m64 (m2);
v2 = in_over (vsrc, vsrca, expand_alpha_rev (vm2), v2);
- __m64 vm3 = to_m64 (m3);
+ vm3 = to_m64 (m3);
v3 = in_over (vsrc, vsrca, expand_alpha_rev (vm3), v3);
- *(__m64 *)dst = pack_4x565 (v0, v1, v2, v3);;
+ *(__m64 *)dst = pack_4x565 (v0, v1, v2, v3);
}
w -= 4;
@@ -3545,32 +3571,35 @@ mmx_composite_over_reverse_n_8888 (pixman_implementation_t *imp,
#define BILINEAR_INTERPOLATE_ONE_PIXEL(pix) \
do { \
+ __m64 t_hi, t_lo, b_hi, b_lo, hi, lo; \
/* fetch 2x2 pixel block into 2 mmx registers */ \
__m64 t = ldq_u ((__m64 *)&src_top [pixman_fixed_to_int (vx)]); \
__m64 b = ldq_u ((__m64 *)&src_bottom [pixman_fixed_to_int (vx)]); \
vx += unit_x; \
/* vertical interpolation */ \
- __m64 t_hi = _mm_mullo_pi16 (_mm_unpackhi_pi8 (t, mm_zero), mm_wt); \
- __m64 t_lo = _mm_mullo_pi16 (_mm_unpacklo_pi8 (t, mm_zero), mm_wt); \
- __m64 b_hi = _mm_mullo_pi16 (_mm_unpackhi_pi8 (b, mm_zero), mm_wb); \
- __m64 b_lo = _mm_mullo_pi16 (_mm_unpacklo_pi8 (b, mm_zero), mm_wb); \
- __m64 hi = _mm_add_pi16 (t_hi, b_hi); \
- __m64 lo = _mm_add_pi16 (t_lo, b_lo); \
+ t_hi = _mm_mullo_pi16 (_mm_unpackhi_pi8 (t, mm_zero), mm_wt); \
+ t_lo = _mm_mullo_pi16 (_mm_unpacklo_pi8 (t, mm_zero), mm_wt); \
+ b_hi = _mm_mullo_pi16 (_mm_unpackhi_pi8 (b, mm_zero), mm_wb); \
+ b_lo = _mm_mullo_pi16 (_mm_unpacklo_pi8 (b, mm_zero), mm_wb); \
+ hi = _mm_add_pi16 (t_hi, b_hi); \
+ lo = _mm_add_pi16 (t_lo, b_lo); \
if (BILINEAR_INTERPOLATION_BITS < 8) \
{ \
+ __m64 p, q; \
/* calculate horizontal weights */ \
__m64 mm_wh = _mm_add_pi16 (mm_addc7, _mm_xor_si64 (mm_xorc7, \
_mm_srli_pi16 (mm_x, \
16 - BILINEAR_INTERPOLATION_BITS))); \
mm_x = _mm_add_pi16 (mm_x, mm_ux); \
/* horizontal interpolation */ \
- __m64 p = _mm_unpacklo_pi16 (lo, hi); \
- __m64 q = _mm_unpackhi_pi16 (lo, hi); \
+ p = _mm_unpacklo_pi16 (lo, hi); \
+ q = _mm_unpackhi_pi16 (lo, hi); \
lo = _mm_madd_pi16 (p, mm_wh); \
hi = _mm_madd_pi16 (q, mm_wh); \
} \
else \
{ \
+ __m64 mm_lo_lo, mm_lo_hi, mm_hi_lo, mm_hi_hi; \
/* calculate horizontal weights */ \
__m64 mm_wh_lo = _mm_sub_pi16 (mm_BSHIFT, _mm_srli_pi16 (mm_x, \
16 - BILINEAR_INTERPOLATION_BITS)); \
@@ -3578,10 +3607,10 @@ do { \
16 - BILINEAR_INTERPOLATION_BITS); \
mm_x = _mm_add_pi16 (mm_x, mm_ux); \
/* horizontal interpolation */ \
- __m64 mm_lo_lo = _mm_mullo_pi16 (lo, mm_wh_lo); \
- __m64 mm_lo_hi = _mm_mullo_pi16 (hi, mm_wh_hi); \
- __m64 mm_hi_lo = _mm_mulhi_pu16 (lo, mm_wh_lo); \
- __m64 mm_hi_hi = _mm_mulhi_pu16 (hi, mm_wh_hi); \
+ mm_lo_lo = _mm_mullo_pi16 (lo, mm_wh_lo); \
+ mm_lo_hi = _mm_mullo_pi16 (hi, mm_wh_hi); \
+ mm_hi_lo = _mm_mulhi_pu16 (lo, mm_wh_lo); \
+ mm_hi_hi = _mm_mulhi_pu16 (hi, mm_wh_hi); \
lo = _mm_add_pi32 (_mm_unpacklo_pi16 (mm_lo_lo, mm_hi_lo), \
_mm_unpacklo_pi16 (mm_lo_hi, mm_hi_hi)); \
hi = _mm_add_pi32 (_mm_unpackhi_pi16 (mm_lo_lo, mm_hi_lo), \
diff --git a/pixman/pixman/pixman-sse2.c b/pixman/pixman/pixman-sse2.c
index 665eeadbe..ba067bc31 100644
--- a/pixman/pixman/pixman-sse2.c
+++ b/pixman/pixman/pixman-sse2.c
@@ -3370,14 +3370,14 @@ pixman_fill_sse2 (uint32_t *bits,
if (w >= 1 && ((unsigned long)d & 1))
{
- *(uint8_t *)d = data;
+ *(uint8_t *)d = data&0xff;
w -= 1;
d += 1;
}
while (w >= 2 && ((unsigned long)d & 3))
{
- *(uint16_t *)d = data;
+ *(uint16_t *)d = data&0xffff;
w -= 2;
d += 2;
}
@@ -3443,14 +3443,14 @@ pixman_fill_sse2 (uint32_t *bits,
if (w >= 2)
{
- *(uint16_t *)d = data;
+ *(uint16_t *)d = data&0xffff;
w -= 2;
d += 2;
}
if (w >= 1)
{
- *(uint8_t *)d = data;
+ *(uint8_t *)d = data&0xff;
w -= 1;
d += 1;
}
@@ -5373,10 +5373,10 @@ FAST_NEAREST_MAINLOOP_COMMON (sse2_8888_n_8888_none_OVER,
const __m128i xmm_addc8 = _mm_set_epi16 (0, 0, 0, 0, 1, 1, 1, 1); \
const __m128i xmm_xorc7 = _mm_set_epi16 (0, BMSK, 0, BMSK, 0, BMSK, 0, BMSK);\
const __m128i xmm_addc7 = _mm_set_epi16 (0, 1, 0, 1, 0, 1, 0, 1); \
- const __m128i xmm_ux = _mm_set_epi16 (unit_x, unit_x, unit_x, unit_x, \
- unit_x, unit_x, unit_x, unit_x); \
+ const __m128i xmm_ux = _mm_set_epi16 (unit_x&0xffff, unit_x&0xffff, unit_x&0xffff, unit_x&0xffff, \
+ unit_x&0xffff, unit_x&0xffff, unit_x&0xffff, unit_x&0xffff); \
const __m128i xmm_zero = _mm_setzero_si128 (); \
- __m128i xmm_x = _mm_set_epi16 (vx, vx, vx, vx, vx, vx, vx, vx)
+ __m128i xmm_x = _mm_set_epi16 (vx&0xffff, vx&0xffff, vx&0xffff, vx&0xffff, vx&0xffff, vx&0xffff, vx&0xffff, vx&0xffff)
#define BILINEAR_INTERPOLATE_ONE_PIXEL(pix) \
do { \
diff --git a/pixman/pixman/pixman-trap.c b/pixman/pixman/pixman-trap.c
index adf5d7bb5..c6d90da24 100644
--- a/pixman/pixman/pixman-trap.c
+++ b/pixman/pixman/pixman-trap.c
@@ -138,7 +138,7 @@ _pixman_edge_multi_init (pixman_edge_t * e,
if (ne > 0)
{
- int nx = ne / e->dy;
+ pixman_fixed_48_16_t nx = ne / e->dy;
ne -= nx * (pixman_fixed_48_16_t)e->dy;
stepx += nx * e->signdx;
}
diff --git a/pixman/pixman/pixman-version.h b/pixman/pixman/pixman-version.h
new file mode 100644
index 000000000..70642e961
--- /dev/null
+++ b/pixman/pixman/pixman-version.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * 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 AUTHORS OR COPYRIGHT HOLDERS
+ * 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.
+ *
+ * Author: Carl D. Worth <cworth@cworth.org>
+ */
+
+#ifndef PIXMAN_VERSION_H__
+#define PIXMAN_VERSION_H__
+
+#ifndef PIXMAN_H__
+# error pixman-version.h should only be included by pixman.h
+#endif
+
+#define PIXMAN_VERSION_MAJOR 0
+#define PIXMAN_VERSION_MINOR 19
+#define PIXMAN_VERSION_MICRO 1
+
+#define PIXMAN_VERSION_STRING "0.19.1"
+
+#define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \
+ ((major) * 10000) \
+ + ((minor) * 100) \
+ + ((micro) * 1))
+
+#define PIXMAN_VERSION PIXMAN_VERSION_ENCODE( \
+ PIXMAN_VERSION_MAJOR, \
+ PIXMAN_VERSION_MINOR, \
+ PIXMAN_VERSION_MICRO)
+
+#endif /* PIXMAN_VERSION_H__ */