summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-04-07 03:10:01 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-04-07 03:10:01 (GMT)
commit018edd573eac026f861e97ffab611b4eeb059830 (patch)
tree34c464b003cfbc6e322e3b79ab0ca088af391994 /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
parentec8830ae216ce7f350a2a3ef17066e52e9051625 (diff)
downloadQt-018edd573eac026f861e97ffab611b4eeb059830.zip
Qt-018edd573eac026f861e97ffab611b4eeb059830.tar.gz
Qt-018edd573eac026f861e97ffab611b4eeb059830.tar.bz2
Clean up surface creation code
Use the intended functions for surface creation. Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 9f5c055..6857d96 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -144,15 +144,11 @@ void QDirectFBPixmapData::fill(const QColor &color)
Q_ASSERT(dfbSurface);
if (color.alpha() < 255 && !hasAlphaChannel()) {
- DFBSurfaceDescription description;
- description.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH |
- DSDESC_HEIGHT |
- DSDESC_PIXELFORMAT);
- dfbSurface->GetSize(dfbSurface, &description.width, &description.height);
- QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, screen->alphaPixmapFormat());
- screen->releaseDFBSurface(dfbSurface); // release old surface
-
- dfbSurface = screen->createDFBSurface(&description, QDirectFBScreen::TrackSurface);
+
+ QSize size;
+ dfbSurface->GetSize(dfbSurface, &size.rwidth(), &size.rheight());
+ screen->releaseDFBSurface(dfbSurface);
+ dfbSurface = screen->createDFBSurface(size, screen->alphaPixmapFormat(), QDirectFBScreen::TrackSurface);
forceRaster = false;
setSerialNumber(++global_ser_no);
if (!dfbSurface) {