diff options
Diffstat (limited to 'pixman')
-rw-r--r-- | pixman/pixman/config.h | 227 | ||||
-rw-r--r-- | pixman/pixman/makefile | 76 | ||||
-rw-r--r-- | pixman/pixman/pixman-compiler.h | 18 | ||||
-rw-r--r-- | pixman/pixman/pixman-fast-path.h | 2 | ||||
-rw-r--r-- | pixman/pixman/pixman-mmx.c | 26 | ||||
-rw-r--r-- | pixman/pixman/pixman-trap.c | 4 | ||||
-rw-r--r-- | pixman/pixman/pixman-version.h | 50 |
7 files changed, 392 insertions, 11 deletions
diff --git a/pixman/pixman/config.h b/pixman/pixman/config.h new file mode 100644 index 000000000..50adacc11 --- /dev/null +++ b/pixman/pixman/config.h @@ -0,0 +1,227 @@ +/* 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_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 */ +#undef USE_SSE2 + +/* 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 diff --git a/pixman/pixman/makefile b/pixman/pixman/makefile new file mode 100644 index 000000000..04ef413f4 --- /dev/null +++ b/pixman/pixman/makefile @@ -0,0 +1,76 @@ +LIBRARY = libpixman-1 + +INCLUDES += $(OBJDIR) + +CSRCS = \ + pixman-access.c \ + pixman-access-accessors.c \ + pixman-cpu.c \ + pixman-gradient-walker.c \ + pixman-region16.c \ + pixman-region32.c \ + pixman-image.c \ + pixman-implementation.c \ + pixman-combine32.c \ + pixman-combine64.c \ + pixman-general.c \ + pixman.c \ + pixman-fast-path.c \ + pixman-solid-fill.c \ + pixman-conical-gradient.c \ + pixman-linear-gradient.c \ + pixman-radial-gradient.c \ + pixman-bits-image.c \ + pixman-utils.c \ + pixman-edge.c \ + pixman-edge-accessors.c \ + pixman-trap.c \ + pixman-timer.c \ + pixman-matrix.c + +BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c + +$(OBJDIR)\pixman-combine32.c : pixman-combine.c.template 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 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 +#if USE_MMX +#noinst_LTLIBRARIES += libpixman-mmx.la +CSRCS += \ + pixman-mmx.c +# pixman-mmx.h +#libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS) +#libpixman_mmx_la_LIBADD = $(DEP_LIBS) +#libpixman_1_la_LIBADD += libpixman-mmx.la +#endif + +## vmx code +#if USE_VMX +#noinst_LTLIBRARIES += libpixman-vmx.la +#libpixman_vmx_la_SOURCES = \ +# pixman-vmx.c \ +# pixman-vmx.h \ +# pixman-combine32.h +#libpixman_vmx_la_CFLAGS = $(DEP_CFLAGS) $(VMX_CFLAGS) +#libpixman_vmx_la_LIBADD = $(DEP_LIBS) +#libpixman_1_la_LIBADD += libpixman-vmx.la +#endif + +# sse2 code +#if USE_SSE2 +#noinst_LTLIBRARIES += libpixman-sse2.la +#libpixman_sse2_la_SOURCES = \ +# pixman-sse2.c \ +# pixman-sse2.h +#libpixman_sse2_la_CFLAGS = $(DEP_CFLAGS) $(SSE2_CFLAGS) +#libpixman_sse2_la_LIBADD = $(DEP_LIBS) +#libpixman_1_la_LIBADD += libpixman-sse2.la +#endif + diff --git a/pixman/pixman/pixman-compiler.h b/pixman/pixman/pixman-compiler.h index 36b71fd1d..0fe30a79c 100644 --- a/pixman/pixman/pixman-compiler.h +++ b/pixman/pixman/pixman-compiler.h @@ -89,10 +89,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-fast-path.h b/pixman/pixman/pixman-fast-path.h index 0f47ff77c..5de0e1ee0 100644 --- a/pixman/pixman/pixman-fast-path.h +++ b/pixman/pixman/pixman-fast-path.h @@ -265,7 +265,7 @@ fast_composite_scaled_nearest_ ## scale_func_name (pixman_implementation_t *imp, dst_type_t *dst_line; \
src_type_t *src_first_line; \
int y; \
- pixman_fixed_t max_vx = max_vx; /* suppress uninitialized variable warning */ \
+ pixman_fixed_t max_vx = 0; /* suppress uninitialized variable warning */ \
pixman_fixed_t max_vy; \
pixman_vector_t v; \
pixman_fixed_t vx, vy; \
diff --git a/pixman/pixman/pixman-mmx.c b/pixman/pixman/pixman-mmx.c index 8284fe480..0b98282cb 100644 --- a/pixman/pixman/pixman-mmx.c +++ b/pixman/pixman/pixman-mmx.c @@ -152,6 +152,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)
{
@@ -164,6 +167,7 @@ to_uint64 (__m64 x) return (uint64_t)x;
#endif
}
+#endif
static force_inline __m64
shift (__m64 v,
@@ -310,11 +314,15 @@ pack8888 (__m64 lo, __m64 hi) return _mm_packs_pu16 (lo, hi);
}
+#ifdef _MSC_VER
+#define store8888(v) _mm_cvtsi64_si32 (pack8888 (v, _mm_setzero_si64 ()))
+#else
static force_inline uint32_t
store8888 (__m64 v)
{
return _mm_cvtsi64_si32 (pack8888 (v, _mm_setzero_si64 ()));
}
+#endif
/* Expand 16 bits positioned at @pos (0-3) of a mmx register into
*
@@ -417,6 +425,13 @@ pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b) /* --------------- MMX code patch for fbcompose.c --------------------- */
+#ifdef _MSC_VER
+#define combine(src, mask) \
+ ((mask) ? \
+ store8888 (pix_multiply (load8888 (*src), expand_alpha (load8888 (*mask)))) \
+ : \
+ *src)
+#else
static force_inline uint32_t
combine (const uint32_t *src, const uint32_t *mask)
{
@@ -435,6 +450,7 @@ combine (const uint32_t *src, const uint32_t *mask) return ssrc;
}
+#endif
static void
mmx_combine_over_u (pixman_implementation_t *imp,
@@ -448,7 +464,7 @@ mmx_combine_over_u (pixman_implementation_t *imp, while (dest < end)
{
- uint32_t ssrc = combine (src, mask);
+ uint32_t ssrc = combine( src, mask);
uint32_t a = ssrc >> 24;
if (a == 0xff)
@@ -1685,7 +1701,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++;
@@ -1728,7 +1744,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++;
@@ -1943,7 +1959,7 @@ pixman_fill_mmx (uint32_t *bits, while (w >= 2 && ((unsigned long)d & 3))
{
- *(uint16_t *)d = xor;
+ *(uint16_t *)d = (xor & 0xffff);
w -= 2;
d += 2;
}
@@ -1996,7 +2012,7 @@ pixman_fill_mmx (uint32_t *bits, }
while (w >= 2)
{
- *(uint16_t *)d = xor;
+ *(uint16_t *)d = (xor & 0xffff);
w -= 2;
d += 2;
}
diff --git a/pixman/pixman/pixman-trap.c b/pixman/pixman/pixman-trap.c index 8353992c5..5df15513a 100644 --- a/pixman/pixman/pixman-trap.c +++ b/pixman/pixman/pixman-trap.c @@ -136,8 +136,8 @@ _pixman_edge_multi_init (pixman_edge_t * e, if (ne > 0) { - int nx = ne / e->dy; - ne -= nx * 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__ */ |