diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-18 09:01:51 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-18 09:01:51 +0100 |
commit | c7934f2489e2eb9a539206bab35f335b1943c5bd (patch) | |
tree | a27d0ed6c001fe9432e2a0f28fb935acf9e4c65f /src/gui/painting | |
parent | f40593b11199fbef886bfcb6b210a214d8c3adf3 (diff) | |
parent | 08f9a1bd6ab9b1777ee5ba163d75e5c848c39eb4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/corelib/io/qprocess.cpp
src/corelib/io/qprocess_unix.cpp
src/network/kernel/qnetworkinterface_winrt.cpp
tools/configure/configureapp.cpp
Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 14 | ||||
-rw-r--r-- | src/gui/painting/qrgba64.h | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 5c1cd8adef..52843fa113 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -379,9 +379,9 @@ static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uin template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB() { return QPixelLayout{ - redWidth<Format>(), redShift<Format>(), - greenWidth<Format>(), greenShift<Format>(), - blueWidth<Format>(), blueShift<Format>(), + uchar(redWidth<Format>()), uchar(redShift<Format>()), + uchar(greenWidth<Format>()), uchar(greenShift<Format>()), + uchar(blueWidth<Format>()), uchar(blueShift<Format>()), 0, 0, false, bitsPerPixel<Format>(), convertToRGB32<Format>, @@ -394,10 +394,10 @@ template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixe template<QImage::Format Format> Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutARGBPM() { return QPixelLayout{ - redWidth<Format>(), redShift<Format>(), - greenWidth<Format>(), greenShift<Format>(), - blueWidth<Format>(), blueShift<Format>(), - alphaWidth<Format>(), alphaShift<Format>(), + uchar(redWidth<Format>()), uchar(redShift<Format>()), + uchar(greenWidth<Format>()), uchar(greenShift<Format>()), + uchar(blueWidth<Format>()), uchar(blueShift<Format>()), + uchar(alphaWidth<Format>()), uchar(alphaShift<Format>()), true, bitsPerPixel<Format>(), convertARGBPMToARGB32PM<Format>, convertARGBPMFromARGB32PM<Format>, diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index 264ec394cd..fab9506ff2 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -161,12 +161,12 @@ public: } private: - static Q_DECL_CONSTEXPR quint64 alphaMask() { return Q_UINT64_C(0xffff) << AlphaShift; } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE quint64 alphaMask() { return Q_UINT64_C(0xffff) << AlphaShift; } - static Q_DECL_CONSTEXPR uint div_257_floor(uint x) { return (x - (x >> 8)) >> 8; } - static Q_DECL_CONSTEXPR uint div_257(uint x) { return div_257_floor(x + 128); } - static Q_DECL_CONSTEXPR uint div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; } - Q_DECL_RELAXED_CONSTEXPR QRgba64 unpremultiplied_32bit() const + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_257_floor(uint x) { return (x - (x >> 8)) >> 8; } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_257(uint x) { return div_257_floor(x + 128); } + static Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint div_65535(uint x) { return (x + (x>>16) + 0x8000U) >> 16; } + Q_DECL_RELAXED_CONSTEXPR Q_ALWAYS_INLINE QRgba64 unpremultiplied_32bit() const { if (isOpaque() || isTransparent()) return *this; @@ -176,7 +176,7 @@ private: const quint16 b = (quint32(blue()) * 0xffff + a/2) / a; return fromRgba64(r, g, b, a); } - Q_DECL_RELAXED_CONSTEXPR QRgba64 unpremultiplied_64bit() const + Q_DECL_RELAXED_CONSTEXPR Q_ALWAYS_INLINE QRgba64 unpremultiplied_64bit() const { if (isOpaque() || isTransparent()) return *this; |