diff options
Diffstat (limited to 'src/gui/painting/qdrawhelper_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 2e9f064951..f502533443 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -71,9 +71,15 @@ QT_BEGIN_NAMESPACE // RVCT doesn't like static template functions # define Q_STATIC_TEMPLATE_FUNCTION # define Q_STATIC_INLINE_FUNCTION static __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_DECL_RESTRICT __restrict__ #else # define Q_STATIC_TEMPLATE_FUNCTION static # define Q_STATIC_INLINE_FUNCTION static inline +# define Q_DECL_RESTRICT #endif static const uint AMASK = 0xff000000; @@ -162,7 +168,7 @@ extern DrawHelper qDrawHelper[QImage::NImageFormats]; void qBlendTexture(int count, const QSpan *spans, void *userData); -typedef void (QT_FASTCALL *CompositionFunction)(uint *dest, const uint *src, int length, uint const_alpha); +typedef void (QT_FASTCALL *CompositionFunction)(uint *Q_DECL_RESTRICT dest, const uint *Q_DECL_RESTRICT src, int length, uint const_alpha); typedef void (QT_FASTCALL *CompositionFunctionSolid)(uint *dest, int length, uint color, uint const_alpha); struct LinearGradientValues |