summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2009-05-05 07:31:04 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2009-05-05 12:36:45 (GMT)
commit8806c32f45242c9d12c6799c2c762775da58b698 (patch)
tree5266fa61b1282da527c3a6fcb4d7bd96cab6165d /src/gui/painting
parente6d0c873c707bf076ba41924a445c0e1d343ac38 (diff)
downloadQt-8806c32f45242c9d12c6799c2c762775da58b698.zip
Qt-8806c32f45242c9d12c6799c2c762775da58b698.tar.gz
Qt-8806c32f45242c9d12c6799c2c762775da58b698.tar.bz2
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/painting')
-rw-r--r--src/gui/painting/qmemrotate.cpp28
-rw-r--r--src/gui/painting/qmemrotate_p.h8
2 files changed, 36 insertions, 0 deletions
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 4058143..471f544 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -528,6 +528,26 @@ void qt_memrotate270(const srctype *src, int w, int h, int sstride, \
qt_memrotate270_template(src, w, h, sstride, dest, dstride); \
}
+#define QT_IMPL_SIMPLE_MEMROTATE(srctype, desttype) \
+void qt_memrotate90(const srctype *src, int w, int h, int sstride, \
+ desttype *dest, int dstride) \
+{ \
+ qt_memrotate90_tiled_unpacked<desttype,srctype>(src, w, h, sstride, dest, dstride); \
+} \
+void qt_memrotate180(const srctype *src, int w, int h, int sstride, \
+ desttype *dest, int dstride) \
+{ \
+ qt_memrotate180_template(src, w, h, sstride, dest, dstride); \
+} \
+void qt_memrotate270(const srctype *src, int w, int h, int sstride, \
+ desttype *dest, int dstride) \
+{ \
+ qt_memrotate270_tiled_unpacked<desttype,srctype>(src, w, h, sstride, dest, dstride); \
+}
+
+
+
+
QT_IMPL_MEMROTATE(quint32, quint32)
QT_IMPL_MEMROTATE(quint32, quint16)
QT_IMPL_MEMROTATE(quint16, quint32)
@@ -539,6 +559,14 @@ QT_IMPL_MEMROTATE(quint32, quint8)
QT_IMPL_MEMROTATE(quint16, quint8)
QT_IMPL_MEMROTATE(qrgb444, quint8)
QT_IMPL_MEMROTATE(quint8, quint8)
+
+#if defined(QT_QWS_ROTATE_BGR)
+QT_IMPL_SIMPLE_MEMROTATE(quint16, qbgr565)
+QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr565)
+QT_IMPL_SIMPLE_MEMROTATE(qrgb555, qbgr555)
+QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr555)
+#endif
+
#ifdef QT_QWS_DEPTH_GENERIC
QT_IMPL_MEMROTATE(quint32, qrgb_generic16)
QT_IMPL_MEMROTATE(quint16, qrgb_generic16)
diff --git a/src/gui/painting/qmemrotate_p.h b/src/gui/painting/qmemrotate_p.h
index c1eb93e..87cfb1a 100644
--- a/src/gui/painting/qmemrotate_p.h
+++ b/src/gui/painting/qmemrotate_p.h
@@ -92,6 +92,14 @@ QT_DECL_MEMROTATE(quint32, quint8);
QT_DECL_MEMROTATE(quint16, quint8);
QT_DECL_MEMROTATE(qrgb444, quint8);
QT_DECL_MEMROTATE(quint8, quint8);
+
+#ifdef QT_QWS_ROTATE_BGR
+QT_DECL_MEMROTATE(quint16, qbgr565);
+QT_DECL_MEMROTATE(quint32, qbgr565);
+QT_DECL_MEMROTATE(qrgb555, qbgr555);
+QT_DECL_MEMROTATE(quint32, qbgr555);
+#endif
+
#ifdef QT_QWS_DEPTH_GENERIC
QT_DECL_MEMROTATE(quint32, qrgb_generic16);
QT_DECL_MEMROTATE(quint16, qrgb_generic16);