From 2b8b878f5a33e067c22d8387f8a3e14c5ea51114 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 5 Nov 2018 12:53:28 -0800 Subject: Remove QT_MEMCPY_USHORT macro and just use memcpy Compilers can optimize memcpy, so don't try to be too smart. Change-Id: Iba4b5c183776497d8ee1fffd156455b50de65182 Patch-By: Allan Sandfeld Jensen Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qblendfunctions.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/gui/painting/qblendfunctions.cpp') diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 2dd5144e40..348eceb47f 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -187,19 +187,11 @@ void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl, #endif if (const_alpha == 256) { - if (w <= 64) { - while (h--) { - QT_MEMCPY_USHORT(dst, src, w); - dst += dbpl; - src += sbpl; - } - } else { - int length = w << 1; - while (h--) { - memcpy(dst, src, length); - dst += dbpl; - src += sbpl; - } + int length = w << 1; + while (h--) { + memcpy(dst, src, length); + dst += dbpl; + src += sbpl; } } else if (const_alpha != 0) { quint16 *d = (quint16 *) dst; -- cgit v1.2.3