summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_p.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-29 08:13:40 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-29 08:13:40 +0200
commitcc74452d6d259d36ac47c536f11a5efb269e8e44 (patch)
treee43ac89e9edde354d12fbddffcbb6e40108cc643 /src/gui/painting/qdrawhelper_p.h
parent6cbd982836266a59e926d8f149ad0013bd8162a3 (diff)
parente52fcb7dc78c83586c813f55f087a98bae4eaa0e (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: configure src/plugins/platforms/winrt/qwinrtclipboard.cpp Change-Id: Ic6d58be3d1ed2bb507f2ba06c82361afd9f9ddb9
Diffstat (limited to 'src/gui/painting/qdrawhelper_p.h')
-rw-r--r--src/gui/painting/qdrawhelper_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 21af6039f8..fa3e6396ec 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -760,6 +760,7 @@ static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) {
return t;
}
+// qt_div_255 is a fast rounded division by 255 using an approximation that is accurate for all positive 16-bit integers
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; }