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/qdrawhelper_p.h | |
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/qdrawhelper_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 509fa044f8..23520ad64b 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -944,26 +944,6 @@ inline void qt_rectfill(T *dest, T value, } } -#define QT_MEMCPY_USHORT(dest, src, length) \ -do { \ - /* Duff's device */ \ - ushort *_d = (ushort*)(dest); \ - const ushort *_s = (const ushort*)(src); \ - int n = ((length) + 7) / 8; \ - switch ((length) & 0x07) \ - { \ - case 0: do { *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 7: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 6: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 5: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 4: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 3: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 2: *_d++ = *_s++; Q_FALLTHROUGH(); \ - case 1: *_d++ = *_s++; \ - } while (--n > 0); \ - } \ -} while (false) - inline ushort qConvertRgb32To16(uint c) { return (((c) >> 3) & 0x001f) |