summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-21 08:57:24 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-21 08:57:24 (GMT)
commit49c5acd406f5d2607b7a66d38d6279aa8c78f7f9 (patch)
treef45126f94631d128a05817e8179ebbaaa607df60 /src/gui/embedded
parenta44894a39113e0eb9d4f7c912eee4671b3f391c1 (diff)
parent8280ed177d798aeaf82868ba6c7c8c4250051f1d (diff)
downloadQt-49c5acd406f5d2607b7a66d38d6279aa8c78f7f9.zip
Qt-49c5acd406f5d2607b7a66d38d6279aa8c78f7f9.tar.gz
Qt-49c5acd406f5d2607b7a66d38d6279aa8c78f7f9.tar.bz2
Merge commit 'qt/master'
Conflicts: examples/graphicsview/graphicsview.pro
Diffstat (limited to 'src/gui/embedded')
-rw-r--r--src/gui/embedded/qscreen_qws.cpp22
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp16
2 files changed, 28 insertions, 10 deletions
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 1d49bd1..cee4a21 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -181,7 +181,27 @@ void QScreenCursor::set(const QImage &image, int hotx, int hoty)
const QRect r = boundingRect();
hotspot = QPoint(hotx, hoty);
- cursor = image;
+ // These are in almost all cases the fastest formats to blend
+ QImage::Format f;
+ switch (qt_screen->depth()) {
+ case 12:
+ f = QImage::Format_ARGB4444_Premultiplied;
+ break;
+ case 15:
+ f = QImage::Format_ARGB8555_Premultiplied;
+ break;
+ case 16:
+ f = QImage::Format_ARGB8565_Premultiplied;
+ break;
+ case 18:
+ f = QImage::Format_ARGB6666_Premultiplied;
+ break;
+ default:
+ f = QImage::Format_ARGB32_Premultiplied;
+ }
+
+ cursor = image.convertToFormat(f);
+
size = image.size();
if (enable && !hwaccel)
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index 34fc54c..69e5808 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -271,15 +271,13 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
QScreen::setFrameBufferLittleEndian(true);
#endif
- // Check for explicitly specified device
- const int len = 8; // "/dev/fbx"
- int m = displaySpec.indexOf(QLatin1String("/dev/fb"));
-
- QString dev;
- if (m > 0)
- dev = displaySpec.mid(m, len);
- else
- dev = QLatin1String("/dev/fb0");
+ QString dev = QLatin1String("/dev/fb0");
+ foreach(QString d, args) {
+ if (d.startsWith(QLatin1Char('/'))) {
+ dev = d;
+ break;
+ }
+ }
if (access(dev.toLatin1().constData(), R_OK|W_OK) == 0)
d_ptr->fd = QT_OPEN(dev.toLatin1().constData(), O_RDWR);