aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-26 09:41:40 +0000
committermarha <marha@users.sourceforge.net>2010-08-26 09:41:40 +0000
commit29990b52b9d48ba282da3c773a92316a33cc0b19 (patch)
tree5542038845387b00dc11aa00e5f0e4e61ba6c438 /pixman
parentf1e55ffbe94408dc7aee8a9a5fbb45fdd72afe9b (diff)
parent9e5a55add045483af139e9e994325ca70eadc8fc (diff)
downloadvcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.tar.gz
vcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.tar.bz2
vcxsrv-29990b52b9d48ba282da3c773a92316a33cc0b19.zip
svn merge ^/branches/released .
Diffstat (limited to 'pixman')
-rw-r--r--pixman/configure.ac14
-rw-r--r--pixman/pixman/pixman.c131
2 files changed, 66 insertions, 79 deletions
diff --git a/pixman/configure.ac b/pixman/configure.ac
index 1b592de14..851a16a66 100644
--- a/pixman/configure.ac
+++ b/pixman/configure.ac
@@ -178,7 +178,6 @@ AC_SUBST(PIXMAN_VERSION_MICRO)
AC_SUBST(LT_VERSION_INFO)
# Check for dependencies
-#PKG_CHECK_MODULES(DEP, x11)
PIXMAN_CHECK_CFLAG([-Wall])
PIXMAN_CHECK_CFLAG([-fno-strict-aliasing])
@@ -585,11 +584,18 @@ AC_ARG_ENABLE(gtk,
[enable_gtk=$enableval], [enable_gtk=auto])
PKG_PROG_PKG_CONFIG
+
+if test $enable_gtk = yes ; then
+ AC_CHECK_LIB([pixman-1], [pixman_version_string])
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 pixman-1])
+fi
+
if test $enable_gtk = auto ; then
- PKG_CHECK_EXISTS([gtk+-2.0], [enable_gtk=yes], [enable_gtk=no])
+ AC_CHECK_LIB([pixman-1], [pixman_version_string], [enable_gtk=auto], [enable_gtk=no])
fi
-if test $enable_gtk = yes ; then
- PKG_CHECK_MODULES(GTK, [gtk+-2.0])
+
+if test $enable_gtk = auto ; then
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 pixman-1], [enable_gtk=yes], [enable_gtk=no])
fi
AM_CONDITIONAL(HAVE_GTK, [test "x$enable_gtk" = xyes])
diff --git a/pixman/pixman/pixman.c b/pixman/pixman/pixman.c
index 81cf20a8f..4171cb889 100644
--- a/pixman/pixman/pixman.c
+++ b/pixman/pixman/pixman.c
@@ -501,7 +501,7 @@ typedef struct
PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache);
-static force_inline void
+static force_inline pixman_bool_t
lookup_composite_function (pixman_op_t op,
pixman_format_code_t src_format,
uint32_t src_flags,
@@ -577,7 +577,7 @@ lookup_composite_function (pixman_op_t op,
++info;
}
}
- return;
+ return FALSE;
update_cache:
if (i)
@@ -595,6 +595,8 @@ update_cache:
cache->cache[0].fast_path.dest_flags = dest_flags;
cache->cache[0].fast_path.func = *out_func;
}
+
+ return TRUE;
}
static pixman_bool_t
@@ -803,19 +805,38 @@ analyze_extent (pixman_image_t *image, int x, int y,
return TRUE;
}
-static void
-do_composite (pixman_op_t op,
- pixman_image_t *src,
- pixman_image_t *mask,
- pixman_image_t *dest,
- int src_x,
- int src_y,
- int mask_x,
- int mask_y,
- int dest_x,
- int dest_y,
- int width,
- int height)
+/*
+ * Work around GCC bug causing crashes in Mozilla with SSE2
+ *
+ * When using -msse, gcc generates movdqa instructions assuming that
+ * the stack is 16 byte aligned. Unfortunately some applications, such
+ * as Mozilla and Mono, end up aligning the stack to 4 bytes, which
+ * causes the movdqa instructions to fail.
+ *
+ * The __force_align_arg_pointer__ makes gcc generate a prologue that
+ * realigns the stack pointer to 16 bytes.
+ *
+ * On x86-64 this is not necessary because the standard ABI already
+ * calls for a 16 byte aligned stack.
+ *
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=15693
+ */
+#if defined (USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
+__attribute__((__force_align_arg_pointer__))
+#endif
+PIXMAN_EXPORT void
+pixman_image_composite32 (pixman_op_t op,
+ pixman_image_t * src,
+ pixman_image_t * mask,
+ pixman_image_t * dest,
+ int32_t src_x,
+ int32_t src_y,
+ int32_t mask_x,
+ int32_t mask_y,
+ int32_t dest_x,
+ int32_t dest_y,
+ int32_t width,
+ int32_t height)
{
pixman_format_code_t src_format, mask_format, dest_format;
uint32_t src_flags, mask_flags, dest_flags;
@@ -831,6 +852,11 @@ do_composite (pixman_op_t op,
pixman_implementation_t *imp;
pixman_composite_func_t func;
+ _pixman_image_validate (src);
+ if (mask)
+ _pixman_image_validate (mask);
+ _pixman_image_validate (dest);
+
src_format = src->common.extended_format_code;
src_flags = src->common.flags;
@@ -907,20 +933,21 @@ do_composite (pixman_op_t op,
if (op == PIXMAN_OP_DST)
goto out;
- lookup_composite_function (op,
- src_format, src_flags,
- mask_format, mask_flags,
- dest_format, dest_flags,
- &imp, &func);
-
- walk_region_internal (imp, op,
- src, mask, dest,
- src_x, src_y, mask_x, mask_y,
- dest_x, dest_y,
- width, height,
- (src_flags & FAST_PATH_SIMPLE_REPEAT),
- (mask_flags & FAST_PATH_SIMPLE_REPEAT),
- &region, func);
+ if (lookup_composite_function (op,
+ src_format, src_flags,
+ mask_format, mask_flags,
+ dest_format, dest_flags,
+ &imp, &func))
+ {
+ walk_region_internal (imp, op,
+ src, mask, dest,
+ src_x, src_y, mask_x, mask_y,
+ dest_x, dest_y,
+ width, height,
+ (src_flags & FAST_PATH_SIMPLE_REPEAT),
+ (mask_flags & FAST_PATH_SIMPLE_REPEAT),
+ &region, func);
+ }
out:
if (need_workaround)
@@ -951,52 +978,6 @@ pixman_image_composite (pixman_op_t op,
mask_x, mask_y, dest_x, dest_y, width, height);
}
-/*
- * Work around GCC bug causing crashes in Mozilla with SSE2
- *
- * When using -msse, gcc generates movdqa instructions assuming that
- * the stack is 16 byte aligned. Unfortunately some applications, such
- * as Mozilla and Mono, end up aligning the stack to 4 bytes, which
- * causes the movdqa instructions to fail.
- *
- * The __force_align_arg_pointer__ makes gcc generate a prologue that
- * realigns the stack pointer to 16 bytes.
- *
- * On x86-64 this is not necessary because the standard ABI already
- * calls for a 16 byte aligned stack.
- *
- * See https://bugs.freedesktop.org/show_bug.cgi?id=15693
- */
-#if defined (USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
-__attribute__((__force_align_arg_pointer__))
-#endif
-PIXMAN_EXPORT void
-pixman_image_composite32 (pixman_op_t op,
- pixman_image_t * src,
- pixman_image_t * mask,
- pixman_image_t * dest,
- int32_t src_x,
- int32_t src_y,
- int32_t mask_x,
- int32_t mask_y,
- int32_t dest_x,
- int32_t dest_y,
- int32_t width,
- int32_t height)
-{
- _pixman_image_validate (src);
- if (mask)
- _pixman_image_validate (mask);
- _pixman_image_validate (dest);
-
- do_composite (op,
- src, mask, dest,
- src_x, src_y,
- mask_x, mask_y,
- dest_x, dest_y,
- width, height);
-}
-
PIXMAN_EXPORT pixman_bool_t
pixman_blt (uint32_t *src_bits,
uint32_t *dst_bits,