summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-12-09 15:28:05 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-12-09 17:48:55 +0000
commit49568df95450733dc4c273945e5ced218132c123 (patch)
treea58afe59aac7d9f71bf393677111833edbd5b022 /src/gui
parent02a730331e123d2db778c8af62d7c0e3098da813 (diff)
iOS: Enable non-pixman NEON drawhelpers for both 32 and 64-bit
The pixman drawhelpers are implemented using GAS syntax, which the Clang assembler doesn't handle, nor do they work on 64-bit ARM, so we disable them selectively. They are only used for 16-bit surfaces anyways, so it not a big deal on iOS. Change-Id: I78417fabd7f671f9c5d94b6e5fa5ce10d3fc1d27 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/painting.pri10
-rw-r--r--src/gui/painting/qdrawhelper_neon.cpp10
-rw-r--r--src/gui/painting/qdrawhelper_neon_asm.S4
3 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 45eb8ccbab..a75e40e413 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -101,12 +101,10 @@ SSE4_1_SOURCES += painting/qdrawhelper_sse4.cpp \
painting/qimagescale_sse4.cpp
AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
-!ios {
- CONFIG += no_clang_integrated_as
- NEON_SOURCES += painting/qdrawhelper_neon.cpp painting/qimagescale_neon.cpp
- NEON_HEADERS += painting/qdrawhelper_neon_p.h
- !contains(QT_ARCH, "arm64"): NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
-}
+NEON_SOURCES += painting/qdrawhelper_neon.cpp painting/qimagescale_neon.cpp
+NEON_HEADERS += painting/qdrawhelper_neon_p.h
+NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
+!ios:!contains(QT_ARCH, "arm64"): DEFINES += ENABLE_PIXMAN_DRAWHELPERS
MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp
MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp_p.h
diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp
index 413fddcfdc..e3f5d5bac7 100644
--- a/src/gui/painting/qdrawhelper_neon.cpp
+++ b/src/gui/painting/qdrawhelper_neon.cpp
@@ -135,7 +135,7 @@ static inline uint16x8_t qvsource_over_u16(uint16x8_t src16, uint16x8_t dst16, u
return vaddq_u16(src16, qvbyte_mul_u16(dst16, alpha16, half));
}
-#if !defined(Q_PROCESSOR_ARM_64)
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
extern "C" void
pixman_composite_over_8888_0565_asm_neon (int32_t w,
int32_t h,
@@ -352,7 +352,7 @@ void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl,
void qt_blend_argb32_on_argb32_scanline_neon(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255) {
-#if !defined(Q_PROCESSOR_ARM_64)
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
pixman_composite_scanline_over_asm_neon(length, dest, src);
#else
qt_blend_argb32_on_argb32_neon((uchar *)dest, 4 * length, (uchar *)src, 4 * length, length, 1, 256);
@@ -372,7 +372,7 @@ void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl,
uint16x8_t half = vdupq_n_u16(0x80);
uint16x8_t full = vdupq_n_u16(0xff);
if (const_alpha == 256) {
-#if !defined(Q_PROCESSOR_ARM_64)
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
pixman_composite_over_8888_8888_asm_neon(w, h, (uint32_t *)destPixels, dbpl / 4, (uint32_t *)srcPixels, sbpl / 4);
#else
for (int y=0; y<h; ++y) {
@@ -530,7 +530,7 @@ void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels, int dbpl,
}
}
-#if !defined(Q_PROCESSOR_ARM_64)
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
void qt_alphamapblit_quint16_neon(QRasterBuffer *rasterBuffer,
int x, int y, const QRgba64 &color,
const uchar *bitmap,
@@ -868,7 +868,7 @@ void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uin
}
}
-#if !defined(Q_PROCESSOR_ARM_64)
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
static const int tileSize = 32;
extern "C" void qt_rotate90_16_neon(quint16 *dst, const quint16 *src, int sstride, int dstride, int count);
diff --git a/src/gui/painting/qdrawhelper_neon_asm.S b/src/gui/painting/qdrawhelper_neon_asm.S
index 42a2084bbd..927a03f8ec 100644
--- a/src/gui/painting/qdrawhelper_neon_asm.S
+++ b/src/gui/painting/qdrawhelper_neon_asm.S
@@ -31,6 +31,8 @@
**
****************************************************************************/
+#if defined(ENABLE_PIXMAN_DRAWHELPERS)
+
/* Prevent the stack from becoming executable for no reason... */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@@ -287,3 +289,5 @@ qt_rotate90_16_neon:
pop { r4-r11, pc }
.endfunc
+
+#endif \ No newline at end of file