diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-07-13 19:52:49 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-07-13 19:59:15 (GMT) |
commit | afb4dfc7b9536b7e7f443a89e94f331f8946de07 (patch) | |
tree | 2c88c76e8b9e96a13c87e19dab38b22be4fb2fe5 /src/plugins | |
parent | 815eec62128d9b971306d698c9beee52a604d455 (diff) | |
download | Qt-afb4dfc7b9536b7e7f443a89e94f331f8946de07.zip Qt-afb4dfc7b9536b7e7f443a89e94f331f8946de07.tar.gz Qt-afb4dfc7b9536b7e7f443a89e94f331f8946de07.tar.bz2 |
Move ALPHA_PREMULT
It's only used once and I want to unclutter the top of
qdirectfbpaintengine.cpp
Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 1ea0325..605324e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -147,13 +147,6 @@ static void rasterFallbackWarn(const char *msg, const char *func, const device * #define RASTERFALLBACK(op, one, two, three) #endif -static inline uint ALPHA_MUL(uint x, uint a) -{ - uint t = x * a; - t = ((t + (t >> 8) + 0x80) >> 8) & 0xff; - return t; -} - class SurfaceCache { public: @@ -940,6 +933,13 @@ void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha) surface->SetBlittingFlags(surface, DFBSurfaceBlittingFlags(blittingFlags)); } +static inline uint ALPHA_MUL(uint x, uint a) +{ + uint t = x * a; + t = ((t + (t >> 8) + 0x80) >> 8) & 0xff; + return t; +} + void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color) { Q_ASSERT(surface); |