Optimized fetchUntransformed RGB888
Reuses the optimized routines from qimage to make painting RGB888 images faster on SSSE3 and NEON. Change-Id: I99116b318322ba4cb0ddc2cb90bcf17a0350ef99 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>bb10
parent
fd941ebb6f
commit
b6b3803b21
|
|
@ -6382,11 +6382,15 @@ static void qInitDrawhelperFunctions()
|
|||
int const_alpha);
|
||||
|
||||
extern void QT_FASTCALL storePixelsBPP24_ssse3(uchar *dest, const uint *src, int index, int count);
|
||||
extern const uint * QT_FASTCALL qt_fetchUntransformed_888_ssse3(uint *buffer, const Operator *, const QSpanData *data,
|
||||
int y, int x, int length);
|
||||
qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
|
||||
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
|
||||
qBlendFunctions[QImage::Format_RGBX8888][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
|
||||
qBlendFunctions[QImage::Format_RGBA8888_Premultiplied][QImage::Format_RGBA8888_Premultiplied] = qt_blend_argb32_on_argb32_ssse3;
|
||||
qStorePixels[QPixelLayout::BPP24] = storePixelsBPP24_ssse3;
|
||||
sourceFetch[BlendUntransformed][QImage::Format_RGB888] = qt_fetchUntransformed_888_ssse3;
|
||||
sourceFetch[BlendTiled][QImage::Format_RGB888] = qt_fetchUntransformed_888_ssse3;
|
||||
}
|
||||
#endif // SSSE3
|
||||
|
||||
|
|
@ -6449,6 +6453,9 @@ static void qInitDrawhelperFunctions()
|
|||
|
||||
qt_fetch_radial_gradient = qt_fetch_radial_gradient_neon;
|
||||
|
||||
sourceFetch[BlendUntransformed][QImage::Format_RGB888] = qt_fetchUntransformed_888_neon;
|
||||
sourceFetch[BlendTiled][QImage::Format_RGB888] = qt_fetchUntransformed_888_neon;
|
||||
|
||||
#if defined(ENABLE_PIXMAN_DRAWHELPERS)
|
||||
// The RGB16 helpers are using Arm32 assemblythat has not been ported to AArch64
|
||||
qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon;
|
||||
|
|
|
|||
|
|
@ -1061,6 +1061,16 @@ const uint * QT_FASTCALL qt_fetch_radial_gradient_neon(uint *buffer, const Opera
|
|||
return qt_fetch_radial_gradient_template<QRadialFetchSimd<QSimdNeon>,uint>(buffer, op, data, y, x, length);
|
||||
}
|
||||
|
||||
extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_neon(quint32 *dst, const uchar *src, int len);
|
||||
|
||||
const uint * QT_FASTCALL qt_fetchUntransformed_888_neon(uint *buffer, const Operator *, const QSpanData *data,
|
||||
int y, int x, int length)
|
||||
{
|
||||
const uchar *line = data->texture.scanLine(y) + x * 3;
|
||||
qt_convert_rgb888_to_rgb32_neon(buffer, line, length);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // __ARM_NEON__
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@ void QT_FASTCALL qt_destStoreRGB16_neon(QRasterBuffer *rasterBuffer,
|
|||
void QT_FASTCALL comp_func_solid_SourceOver_neon(uint *destPixels, int length, uint color, uint const_alpha);
|
||||
void QT_FASTCALL comp_func_Plus_neon(uint *dst, const uint *src, int length, uint const_alpha);
|
||||
|
||||
const uint * QT_FASTCALL qt_fetchUntransformed_888_neon(uint *buffer, const Operator *, const QSpanData *data,
|
||||
int y, int x, int length);
|
||||
|
||||
#endif // __ARM_NEON__
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -233,6 +233,16 @@ void QT_FASTCALL storePixelsBPP24_ssse3(uchar *dest, const uint *src, int index,
|
|||
store_uint24_ssse3(dest + index * 3, src, count);
|
||||
}
|
||||
|
||||
extern void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len);
|
||||
|
||||
const uint * QT_FASTCALL qt_fetchUntransformed_888_ssse3(uint *buffer, const Operator *, const QSpanData *data,
|
||||
int y, int x, int length)
|
||||
{
|
||||
const uchar *line = data->texture.scanLine(y) + x * 3;
|
||||
qt_convert_rgb888_to_rgb32_ssse3(buffer, line, length);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_COMPILER_SUPPORTS_SSSE3
|
||||
|
|
|
|||
Loading…
Reference in New Issue