From 5e2b330aaa0ef964d45f9cb60ea258b33d6e7c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 25 Mar 2010 15:47:18 +0100 Subject: Optimized ARGB32PM on RGB16 blending with opacity using NEON. Use the blend_8_pixels_argb32_on_rgb16_neon function that was introduced in an earlier commit. Before: traces/qmlsamegame.trace, iterations: 3, frames: 15, min(ms): 63, median(ms): 64, stddev: 1,275776 %, max(fps): 238,095238 After: traces/qmlsamegame.trace, iterations: 3, frames: 15, min(ms): 57, median(ms): 58, stddev: 0,817464 %, max(fps): 263,157895 Task-number: QTBUG-6684 Reviewed-by: Gunnar Sletta --- src/gui/painting/qdrawhelper_neon.cpp | 37 ++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp index 946e100..ee5f24a 100644 --- a/src/gui/painting/qdrawhelper_neon.cpp +++ b/src/gui/painting/qdrawhelper_neon.cpp @@ -162,19 +162,47 @@ void qt_blend_rgb16_on_argb32_neon(uchar *destPixels, int dbpl, pixman_composite_src_0565_8888_asm_neon(w, h, dst, dbpl, src, sbpl); } +extern "C" void blend_8_pixels_argb32_on_rgb16_neon(quint16 *dst, const quint32 *src, int const_alpha); + void qt_blend_argb32_on_rgb16_neon(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha) { + quint16 *dst = (quint16 *) destPixels; + quint32 *src = (quint32 *) srcPixels; + if (const_alpha != 256) { - qt_blend_argb32_on_rgb16_const_alpha(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); + for (int y=0; y -- cgit v0.12