diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-11-05 12:53:28 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-11-08 15:26:57 +0000 |
commit | 2b8b878f5a33e067c22d8387f8a3e14c5ea51114 (patch) | |
tree | ff04739f14dc266886045a5e97742c1569596418 /src/gui/painting/qblendfunctions.cpp | |
parent | 87d6a631b76bb9c0a803e25a1efed017578c66c4 (diff) |
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 <allan.jensen@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qblendfunctions.cpp')
-rw-r--r-- | src/gui/painting/qblendfunctions.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
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; |