summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-05-26 12:07:18 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-04 14:03:46 +0200
commit3acd4b546ded7523f65d60cee6f3809113a91a16 (patch)
treeac526a90c4b39229ea5ec4c80b779ca8a4b66c24 /src/gui/painting/qpaintengine_raster.cpp
parent715b41ce48c9dd78eec3223606e9ca5193cf5bad (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/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index a004428fab..2e340219b9 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -423,6 +423,8 @@ void QRasterPaintEngine::init()
case QImage::Format_ARGB32:
case QImage::Format_RGBA8888_Premultiplied:
case QImage::Format_RGBA8888:
+ case QImage::Format_A2BGR30_Premultiplied:
+ case QImage::Format_A2RGB30_Premultiplied:
gccaps |= PorterDuff;
break;
case QImage::Format_RGB32:
@@ -432,6 +434,8 @@ void QRasterPaintEngine::init()
case QImage::Format_RGB888:
case QImage::Format_RGB16:
case QImage::Format_RGBX8888:
+ case QImage::Format_BGR30:
+ case QImage::Format_RGB30:
break;
default:
break;
@@ -2243,6 +2247,8 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe
case QImage::Format_ARGB8555_Premultiplied:
case QImage::Format_ARGB4444_Premultiplied:
case QImage::Format_RGBA8888_Premultiplied:
+ case QImage::Format_A2BGR30_Premultiplied:
+ case QImage::Format_A2RGB30_Premultiplied:
// Combine premultiplied color with the opacity set on the painter.
d->solid_color_filler.solid.color =
((((color & 0x00ff00ff) * s->intOpacity) >> 8) & 0x00ff00ff)