summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-12-29 20:04:23 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-11 23:33:00 +0100
commitf9f0f4aea5f0b66d7dcf0f402e5ccf3053c3957c (patch)
treee495af5ebd37360c558f237176b68df26085d91f
parent28d526db74c50977215133159e565e7c15fd18e3 (diff)
Rename the Q_STATIC_INLINE_FUNCTION macro to Q_ALWAYS_INLINE
That's what the macro did anyway, except it had an extra "static" keyword. This allows us now to use Q_ALWAYS_INLINE in non-static contexts, if we wanted to (e.g., certain template cases). Change-Id: I899d359f46234e93d1912ef9125080dc84e15c93 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
-rw-r--r--src/gui/painting/qdrawhelper_p.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index eda2fc9242..7bd31d0ef5 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -70,15 +70,15 @@ QT_BEGIN_NAMESPACE
#if defined(Q_CC_RVCT)
// RVCT doesn't like static template functions
# define Q_STATIC_TEMPLATE_FUNCTION
-# define Q_STATIC_INLINE_FUNCTION static __forceinline
+# define Q_ALWAYS_INLINE __forceinline
# define Q_DECL_RESTRICT
#elif defined(Q_CC_GNU)
-# define Q_STATIC_TEMPLATE_FUNCTION static __attribute__((always_inline))
-# define Q_STATIC_INLINE_FUNCTION static inline __attribute__((always_inline))
+# define Q_STATIC_TEMPLATE_FUNCTION static
+# define Q_ALWAYS_INLINE inline __attribute__((always_inline))
# define Q_DECL_RESTRICT __restrict__
#else
# define Q_STATIC_TEMPLATE_FUNCTION static
-# define Q_STATIC_INLINE_FUNCTION static inline
+# define Q_ALWAYS_INLINE inline
# define Q_DECL_RESTRICT
#endif
@@ -562,7 +562,7 @@ public:
# pragma push
# pragma arm
#endif
-Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) {
+static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
@@ -579,7 +579,7 @@ Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint
#if QT_POINTER_SIZE == 8 // 64-bit versions
-Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
+static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t += (((quint64(y)) | ((quint64(y)) << 24)) & 0x00ff00ff00ff00ff) * b;
t >>= 8;
@@ -587,14 +587,14 @@ Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint
return (uint(t)) | (uint(t >> 24));
}
-Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) {
+static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
t &= 0x00ff00ff00ff00ff;
return (uint(t)) | (uint(t >> 24));
}
-Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
+static Q_ALWAYS_INLINE uint PREMUL(uint x) {
uint a = x >> 24;
quint64 t = (((quint64(x)) | ((quint64(x)) << 24)) & 0x00ff00ff00ff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff00ff00ff) + 0x80008000800080) >> 8;
@@ -604,7 +604,7 @@ Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
#else // 32-bit versions
-Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
+static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t >>= 8;
t &= 0xff00ff;
@@ -619,7 +619,7 @@ Q_STATIC_INLINE_FUNCTION uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint
# pragma push
# pragma arm
#endif
-Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) {
+static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
@@ -634,7 +634,7 @@ Q_STATIC_INLINE_FUNCTION uint BYTE_MUL(uint x, uint a) {
# pragma pop
#endif
-Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
+static Q_ALWAYS_INLINE uint PREMUL(uint x) {
uint a = x >> 24;
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
@@ -649,14 +649,14 @@ Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x) {
#endif
-Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16(uint x, uint a) {
+static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16(uint x, uint a) {
a += 1;
uint t = (((x & 0x07e0)*a) >> 8) & 0x07e0;
t |= (((x & 0xf81f)*(a>>2)) >> 6) & 0xf81f;
return t;
}
-Q_STATIC_INLINE_FUNCTION uint BYTE_MUL_RGB16_32(uint x, uint a) {
+static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) {
uint t = (((x & 0xf81f07e0) >> 5)*a) & 0xf81f07e0;
t |= (((x & 0x07e0f81f)*a) >> 5) & 0x07e0f81f;
return t;
@@ -794,7 +794,7 @@ do { \
# pragma push
# pragma arm
#endif
-Q_STATIC_INLINE_FUNCTION int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
+static Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
#if defined(Q_CC_RVCT)
# pragma pop
#endif