summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-04-07 05:55:22 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-04-07 05:55:22 (GMT)
commit79adaaf479bfe2e5c252c7aad20db7d04d315444 (patch)
tree7f6e9cb9e147f94d0e22b294bebe72f2daea7c06 /src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp
parentfd4a62bfc18006b3c29918a65b60d9bacf22c9c0 (diff)
downloadQt-79adaaf479bfe2e5c252c7aad20db7d04d315444.zip
Qt-79adaaf479bfe2e5c252c7aad20db7d04d315444.tar.gz
Qt-79adaaf479bfe2e5c252c7aad20db7d04d315444.tar.bz2
Code cleanup.
QDirectFBPaintDevice's know their screen. No need to use instance() in these cases. Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp
index 592ad47..28b1e52 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp
@@ -105,9 +105,9 @@ void QDirectFBSurface::createWindow()
|DWDESC_PIXELFORMAT);
description.surface_caps = DSCAPS_NONE;
- if (QDirectFBScreen::instance()->preferVideoOnly())
+ if (screen->preferVideoOnly())
description.surface_caps = DFBSurfaceCapabilities(description.surface_caps|DSCAPS_VIDEOONLY);
- const QImage::Format format = QDirectFBScreen::instance()->pixelFormat();
+ const QImage::Format format = screen->pixelFormat();
description.pixelformat = QDirectFBScreen::getSurfacePixelFormat(format);
if (QDirectFBScreen::isPremultiplied(format))
description.surface_caps = DFBSurfaceCapabilities(DSCAPS_PREMULTIPLIED|description.caps);
@@ -173,8 +173,8 @@ void QDirectFBSurface::setGeometry(const QRect &rect, const QRegion &mask)
description.width = rect.width();
description.height = rect.height();
QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description,
- QDirectFBScreen::instance()->pixelFormat());
- dfbSurface = QDirectFBScreen::instance()->createDFBSurface(&description, false);
+ screen->pixelFormat());
+ dfbSurface = screen->createDFBSurface(&description, false);
forceRaster = (dfbSurface && QDirectFBScreen::getImageFormat(dfbSurface) == QImage::Format_RGB32);
} else {
Q_ASSERT(dfbSurface);