summaryrefslogtreecommitdiffstats
path: root/src/plugins
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
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')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp10
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index c4144bd..35ab859 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -71,9 +71,9 @@ void QDirectFBPixmapData::resize(int width, int height)
return;
}
- dfbSurface = QDirectFBScreen::instance()->createDFBSurface(QSize(width, height),
- screen->pixelFormat(),
- QDirectFBScreen::TrackSurface);
+ dfbSurface = screen->createDFBSurface(QSize(width, height),
+ screen->pixelFormat(),
+ QDirectFBScreen::TrackSurface);
forceRaster = (screen->pixelFormat() == QImage::Format_RGB32);
if (!dfbSurface) {
setSerialNumber(0);
@@ -111,8 +111,8 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
IDirectFBSurface *src = static_cast<const QDirectFBPixmapData*>(data)->directFBSurface();
const bool hasAlpha = data->hasAlphaChannel();
const QImage::Format format = (hasAlpha
- ? QDirectFBScreen::instance()->alphaPixmapFormat()
- : QDirectFBScreen::instance()->pixelFormat());
+ ? screen->alphaPixmapFormat()
+ : screen->pixelFormat());
dfbSurface = screen->createDFBSurface(rect.size(), format,
QDirectFBScreen::TrackSurface);
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);