aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-01 08:36:02 +0100
committermarha <marha@users.sourceforge.net>2012-02-01 08:36:02 +0100
commit68320ff05946f092b6836754c6267b1dff2f4633 (patch)
tree424d73f509dff521d4cc22a95369594b7ee56dad /pixman
parent71b5bea4d5ef75f50bd7bd7b93f47f8552c178e0 (diff)
parent58ff764d4111bfaa7360c57bc62dd620fbdce06f (diff)
downloadvcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.gz
vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.bz2
vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'pixman')
-rw-r--r--pixman/pixman/pixman-cpu.c45
-rw-r--r--pixman/pixman/pixman.h12
-rw-r--r--pixman/test/composite-traps-test.c2
3 files changed, 50 insertions, 9 deletions
diff --git a/pixman/pixman/pixman-cpu.c b/pixman/pixman/pixman-cpu.c
index 4172e52f6..92942b217 100644
--- a/pixman/pixman/pixman-cpu.c
+++ b/pixman/pixman/pixman-cpu.c
@@ -30,6 +30,10 @@
#include <windows.h>
#endif
+#if defined(__APPLE__)
+#include "TargetConditionals.h"
+#endif
+
#include "pixman-private.h"
#ifdef USE_VMX
@@ -244,6 +248,47 @@ pixman_have_arm_neon (void)
#endif /* USE_ARM_NEON */
+#elif (defined (__APPLE__) && defined(TARGET_OS_IPHONE)) /* iOS (iPhone/iPad/iPod touch) */
+
+/* Detection of ARM NEON on iOS is fairly simple because iOS binaries
+ * contain separate executable images for each processor architecture.
+ * So all we have to do is detect the armv7 architecture build. The
+ * operating system automatically runs the armv7 binary for armv7 devices
+ * and the armv6 binary for armv6 devices.
+ */
+
+pixman_bool_t
+pixman_have_arm_simd (void)
+{
+#if defined(USE_ARM_SIMD)
+ return TRUE;
+#else
+ return FALSE;
+#endif
+}
+
+pixman_bool_t
+pixman_have_arm_neon (void)
+{
+#if defined(USE_ARM_NEON) && defined(__ARM_NEON__)
+ /* This is an armv7 cpu build */
+ return TRUE;
+#else
+ /* This is an armv6 cpu build */
+ return FALSE;
+#endif
+}
+
+pixman_bool_t
+pixman_have_arm_iwmmxt (void)
+{
+#if defined(USE_ARM_IWMMXT)
+ return FALSE;
+#else
+ return FALSE;
+#endif
+}
+
#elif defined (__linux__) || defined(__ANDROID__) || defined(ANDROID) /* linux ELF or ANDROID */
static pixman_bool_t arm_has_v7 = FALSE;
diff --git a/pixman/pixman/pixman.h b/pixman/pixman/pixman.h
index 20ff49695..18d951312 100644
--- a/pixman/pixman/pixman.h
+++ b/pixman/pixman/pixman.h
@@ -908,14 +908,10 @@ struct pixman_triangle
};
/* whether 't' is a well defined not obviously empty trapezoid */
-#define pixman_trapezoid_valid(t) \
- ((t)->left.p1.y != (t)->left.p2.y && \
- (t)->right.p1.y != (t)->right.p2.y && \
- (int) ((t)->bottom - (t)->top) > 0 && \
- (t)->bottom <= (t)->left.p2.y && \
- (t)->bottom <= (t)->right.p2.y && \
- (t)->top >= (t)->left.p1.y && \
- (t)->top >= (t)->right.p1.y)
+#define pixman_trapezoid_valid(t) \
+ ((t)->left.p1.y != (t)->left.p2.y && \
+ (t)->right.p1.y != (t)->right.p2.y && \
+ (int) ((t)->bottom - (t)->top) > 0)
struct pixman_span_fix
{
diff --git a/pixman/test/composite-traps-test.c b/pixman/test/composite-traps-test.c
index de518d820..ff03b50d9 100644
--- a/pixman/test/composite-traps-test.c
+++ b/pixman/test/composite-traps-test.c
@@ -251,6 +251,6 @@ test_composite (int testnum,
int
main (int argc, const char *argv[])
{
- return fuzzer_test_main("composite traps", 40000, 0x4346479C,
+ return fuzzer_test_main("composite traps", 40000, 0xE3112106,
test_composite, argc, argv);
}