summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2011-09-26 19:30:37 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-21 16:54:45 +0200
commit577d51ee22afaf564054d55f6c74a4359a993523 (patch)
tree6abd4023cfaa6cc5de2b0079923b64fca47616ee /src/plugins
parent91e99d142018ed0f9ace057f19984fd60571f7cc (diff)
[directfb] Remove some duplication in the QDirectFbBlitter c'tor.
Introduce dfb_blitter_capabilities that returns the QBlittable::Capabilities of the DirectFB blitter. Change-Id: Ifb803ff4f07376d5333ad2d05ff72d9a63d17fff Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/directfb/qdirectfbblitter.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
index 1fa90f8b56..fcca7dd840 100644
--- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp
+++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp
@@ -48,21 +48,24 @@
#include <directfb.h>
+
+static QBlittable::Capabilities dfb_blitter_capabilities()
+{
+ return QBlittable::Capabilities(QBlittable::SolidRectCapability
+ |QBlittable::SourcePixmapCapability
+ |QBlittable::SourceOverPixmapCapability
+ |QBlittable::SourceOverScaledPixmapCapability);
+}
+
QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, IDirectFBSurface *surface)
- : QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability
- |QBlittable::SourcePixmapCapability
- |QBlittable::SourceOverPixmapCapability
- |QBlittable::SourceOverScaledPixmapCapability))
+ : QBlittable(rect, dfb_blitter_capabilities())
, m_surface(surface)
{
m_surface->AddRef(m_surface.data());
}
QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, bool alpha)
- : QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability
- |QBlittable::SourcePixmapCapability
- |QBlittable::SourceOverPixmapCapability
- |QBlittable::SourceOverScaledPixmapCapability))
+ : QBlittable(rect, dfb_blitter_capabilities())
{
DFBSurfaceDescription surfaceDesc;
memset(&surfaceDesc,0,sizeof(DFBSurfaceDescription));