summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded
diff options
context:
space:
mode:
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);