summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-05-05 09:31:04 +0200
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-05-05 14:36:45 +0200
commit8806c32f45242c9d12c6799c2c762775da58b698 (patch)
tree5266fa61b1282da527c3a6fcb4d7bd96cab6165d /src/gui/embedded
parente6d0c873c707bf076ba41924a445c0e1d343ac38 (diff)
Support rotated displays with 15 and 16 bit BGR pixel formats.
To avoid increasing code size for an uncommon case, the code is #ifdef QT_QWS_ROTATE_BGR Task-number: 250299 Reviewed-by: Tom
Diffstat (limited to 'src/gui/embedded')
-rw-r--r--src/gui/embedded/qscreentransformed_qws.cpp12
-rw-r--r--src/gui/embedded/qscreenvfb_qws.cpp3
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/embedded/qscreentransformed_qws.cpp b/src/gui/embedded/qscreentransformed_qws.cpp
index 46ac1d1b1a..e22ea1f7cf 100644
--- a/src/gui/embedded/qscreentransformed_qws.cpp
+++ b/src/gui/embedded/qscreentransformed_qws.cpp
@@ -400,7 +400,19 @@ void QTransformedScreen::blit(const QImage &image, const QPoint &topLeft,
#endif
#if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_15) || defined(QT_QWS_DEPTH_12)
case 16:
+#if defined QT_QWS_ROTATE_BGR
+ if (pixelType() == BGRPixel && image.depth() == 16) {
+ SET_BLIT_FUNC(qbgr565, quint16, trans, func);
+ break;
+ } //fall-through here!!!
+#endif
case 15:
+#if defined QT_QWS_ROTATE_BGR
+ if (pixelType() == BGRPixel && image.format() == QImage::Format_RGB555) {
+ SET_BLIT_FUNC(qbgr555, qrgb555, trans, func);
+ break;
+ } //fall-through here!!!
+#endif
case 12:
if (image.depth() == 16)
SET_BLIT_FUNC(quint16, quint16, trans, func);
diff --git a/src/gui/embedded/qscreenvfb_qws.cpp b/src/gui/embedded/qscreenvfb_qws.cpp
index abbe73bd91..accfe1f169 100644
--- a/src/gui/embedded/qscreenvfb_qws.cpp
+++ b/src/gui/embedded/qscreenvfb_qws.cpp
@@ -310,6 +310,9 @@ bool QVFbScreen::connect(const QString &displaySpec)
connected = this;
+ if (qgetenv("QT_QVFB_BGR").toInt())
+ pixeltype = BGRPixel;
+
return true;
}