diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-10-16 14:29:11 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-10-16 14:29:11 (GMT) |
commit | 0dd237d05a865c51ad59f4e9f61b194659e32814 (patch) | |
tree | 410ae09ac673b89531abfd2982252c5fdb7319ae /src/gui/painting | |
parent | 2849e21a59a93714defc023a09b185f93cf1e712 (diff) | |
download | Qt-0dd237d05a865c51ad59f4e9f61b194659e32814.zip Qt-0dd237d05a865c51ad59f4e9f61b194659e32814.tar.gz Qt-0dd237d05a865c51ad59f4e9f61b194659e32814.tar.bz2 |
Fixed a crash in tst_qpainter on SPARC w/gcc.
This test works with the native Sun compiler for some reason, and
the problem is an unaligned read of 16 bits, which is a problem
on several other architectures.
Reviewed-by: Kim
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qblendfunctions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 89adaf5..f8dd424 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -374,9 +374,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, const uchar *src = srcPixels + y * sbpl; const uchar *srcEnd = src + srcOffset; while (src < srcEnd) { -#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) +#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) // non-16-bit aligned memory access is not possible on PowerPC, - // ARM <v6 (QT_ARCH_ARMV6) & SH & AVR32 + // ARM <v6 (QT_ARCH_ARMV6) & SH & AVR32 & SPARC w/GCC quint16 spix = (quint16(src[2])<<8) + src[1]; #else quint16 spix = *(quint16 *) (src + 1); |