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 /tests/auto/gui/painting | |
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 'tests/auto/gui/painting')
-rw-r--r-- | tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 4604f840da..5af5b1a269 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -1136,6 +1136,8 @@ void tst_QPainter::fillRect2_data() QTest::newRow("argb32pm") << QImage::Format_ARGB32_Premultiplied; QTest::newRow("rgba8888") << QImage::Format_RGBA8888; QTest::newRow("rgba8888pm") << QImage::Format_RGBA8888_Premultiplied; + QTest::newRow("a2rgb30pm") << QImage::Format_A2RGB30_Premultiplied; + QTest::newRow("a2bgr30pm") << QImage::Format_A2BGR30_Premultiplied; } void tst_QPainter::fillRect2() @@ -1528,6 +1530,8 @@ void tst_QPainter::qimageFormats_data() QTest::newRow("Qimage::Format_RGB555") << QImage::Format_RGB555; QTest::newRow("Qimage::Format_ARGB8555_Premultiplied") << QImage::Format_ARGB8555_Premultiplied; QTest::newRow("Qimage::Format_RGB888") << QImage::Format_RGB888; + QTest::newRow("Qimage::Format_A2RGB30_Premultiplied") << QImage::Format_A2RGB30_Premultiplied; + QTest::newRow("Qimage::Format_RGB30") << QImage::Format_RGB30; } /* @@ -2344,6 +2348,26 @@ void tst_QPainter::setOpacity_data() QTest::newRow("RGB32 on RGBx8888") << QImage::Format_RGB32 << QImage::Format_RGBX8888; + + QTest::newRow("A2RGB30P on A2RGB30P") << QImage::Format_A2RGB30_Premultiplied + << QImage::Format_A2RGB30_Premultiplied; + + QTest::newRow("ARGB32P on A2RGB30P") << QImage::Format_ARGB32_Premultiplied + << QImage::Format_A2RGB30_Premultiplied; + + + QTest::newRow("RGB32 on A2BGR30P") << QImage::Format_ARGB32_Premultiplied + << QImage::Format_A2BGR30_Premultiplied; + + QTest::newRow("A2RGB30P on A2BGR30P") << QImage::Format_A2RGB30_Premultiplied + << QImage::Format_A2BGR30_Premultiplied; + + QTest::newRow("ARGB32P on BGR30") << QImage::Format_ARGB32_Premultiplied + << QImage::Format_BGR30; + + QTest::newRow("ARGB32P on RGB30") << QImage::Format_A2RGB30_Premultiplied + << QImage::Format_RGB30; + } void tst_QPainter::setOpacity() @@ -2432,7 +2456,9 @@ void tst_QPainter::drawhelper_blend_untransformed() dest.bytesPerLine(), dest.format()); if (dest.format() == QImage::Format_ARGB8565_Premultiplied || - dest.format() == QImage::Format_ARGB8555_Premultiplied) { + dest.format() == QImage::Format_ARGB8555_Premultiplied || + dest.format() == QImage::Format_A2BGR30_Premultiplied || + dest.format() == QImage::Format_A2RGB30_Premultiplied ) { // Test skipped due to rounding errors... continue; } |