diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-05-26 12:07:18 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-07-04 14:03:46 +0200 |
commit | 3acd4b546ded7523f65d60cee6f3809113a91a16 (patch) | |
tree | ac526a90c4b39229ea5ec4c80b779ca8a4b66c24 /src/gui/image/qimage_p.h | |
parent | 715b41ce48c9dd78eec3223606e9ca5193cf5bad (diff) |
QImage support for RGB30 formats
Adds basic support for 10-bit per color channel formats to QImage
and the XCB plugin. This will make it possible to paint to and from
these formats, but only at 8-bit per color channel accuracy.
This also fixes Qt5 applications on X11 with native 30bit depth.
[ChangeLog][QtGui][QImage] Added support for 10-bit per color channel image formats.
Task-number: QTBUG-25998
Change-Id: I93ccd3c74bfbb0bd94b352476e5fe58a94119e1f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/image/qimage_p.h')
-rw-r--r-- | src/gui/image/qimage_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index 81730b92f2..a22e207812 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -130,7 +130,7 @@ inline int qt_depthForFormat(QImage::Format format) switch(format) { case QImage::Format_Invalid: case QImage::NImageFormats: - Q_ASSERT(false); + Q_UNREACHABLE(); case QImage::Format_Mono: case QImage::Format_MonoLSB: depth = 1; @@ -144,6 +144,10 @@ inline int qt_depthForFormat(QImage::Format format) case QImage::Format_RGBX8888: case QImage::Format_RGBA8888: case QImage::Format_RGBA8888_Premultiplied: + case QImage::Format_BGR30: + case QImage::Format_A2BGR30_Premultiplied: + case QImage::Format_RGB30: + case QImage::Format_A2RGB30_Premultiplied: depth = 32; break; case QImage::Format_RGB555: |