summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-08-31 16:41:08 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-08-31 17:34:04 (GMT)
commit74136269e834077daa623fe6e1f14adf1b64a7d0 (patch)
tree713ca4407d1b6386a68a17dbcf1a68b702e9ae35
parent627ddefd4f2b27ff2f5127bf20356bb302e6ad6d (diff)
downloadQt-74136269e834077daa623fe6e1f14adf1b64a7d0.zip
Qt-74136269e834077daa623fe6e1f14adf1b64a7d0.tar.gz
Qt-74136269e834077daa623fe6e1f14adf1b64a7d0.tar.bz2
Remove duplicated code in qdirectfbScreen.cpp
Reviewed-by: Donald Carr <donald.carr@nokia.com>
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 9c509d5..8cc7d8a 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -1024,36 +1024,6 @@ static inline bool setIntOption(const QStringList &arguments, const QString &var
return false;
}
-static inline int depth(QImage::Format format)
-{
- switch (format) {
- case QImage::Format_Mono:
- case QImage::Format_MonoLSB:
- return 1;
- case QImage::Format_Indexed8:
- return 8;
- case QImage::Format_RGB32:
- case QImage::Format_ARGB32:
- case QImage::Format_ARGB32_Premultiplied:
- return 32;
- case QImage::Format_ARGB8565_Premultiplied:
- case QImage::Format_RGB666:
- case QImage::Format_ARGB6666_Premultiplied:
- case QImage::Format_ARGB8555_Premultiplied:
- case QImage::Format_RGB888:
- return 24;
- case QImage::Format_RGB555:
- case QImage::Format_RGB444:
- case QImage::Format_RGB16:
- case QImage::Format_ARGB4444_Premultiplied:
- return 16;
- case QImage::Format_Invalid:
- case QImage::NImageFormats:
- break;
- }
- return -1;
-}
-
bool QDirectFBScreen::connect(const QString &displaySpec)
{
DFBResult result = DFB_OK;
@@ -1199,7 +1169,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
break;
}
setPixelFormat(pixelFormat);
- QScreen::d = ::depth(pixelFormat);
+ QScreen::d = QDirectFBScreen::depth(pixelFormat);
data = 0;
lstep = 0;
size = 0;