summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_mips_dsp.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-19 11:14:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-01-27 15:08:57 +0000
commit099f2868701932ee99b60d19429d9c43f96dcadc (patch)
treeed0b4847d11e35072cb87f0b8b07e9217c07da3f /src/gui/painting/qdrawhelper_mips_dsp.cpp
parent02cc57f4edbae450ecfa8368052afa44f8aeee19 (diff)
Fix MIPS DSP configuration
The patch fixes a number of bugs in code, and removes dead logic clarifying that MIPS DSP, like ARM NEON, has no runtime detecton. Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qdrawhelper_mips_dsp.cpp')
-rw-r--r--src/gui/painting/qdrawhelper_mips_dsp.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper_mips_dsp.cpp b/src/gui/painting/qdrawhelper_mips_dsp.cpp
index 783e481296..e92a6606de 100644
--- a/src/gui/painting/qdrawhelper_mips_dsp.cpp
+++ b/src/gui/painting/qdrawhelper_mips_dsp.cpp
@@ -113,7 +113,7 @@ void qt_blend_rgb32_on_rgb32_mips_dsp(uchar *destPixels, int dbpl,
}
}
-#if defined QT_COMPILER_SUPPORTS_MIPS_DSPR2
+#if defined(__MIPS_DSPR2__)
void qt_blend_rgb16_on_rgb16_mips_dspr2(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
int w, int h,
@@ -521,4 +521,17 @@ const uint * QT_FASTCALL qt_fetchUntransformed_argb8565_premultiplied_mips_dsp (
return buffer;
}
+#if defined(__MIPS_DSPR2__)
+extern "C" void qConvertRgb16To32_asm_mips_dspr2(quint32 *dest, const quint16 *src, int length);
+
+const uint *QT_FASTCALL qt_fetchUntransformedRGB16_mips_dspr2(uint *buffer, const Operator *,
+ const QSpanData *data, int y, int x,
+ int length)
+{
+ const quint16 *scanLine = (const quint16 *)data->texture.scanLine(y) + x;
+ qConvertRgb16To32_asm_mips_dspr2(buffer, scanLine, length);
+ return buffer;
+}
+#endif
+
QT_END_NAMESPACE