diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-05-26 07:25:42 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-26 20:26:17 (GMT) |
commit | 01f42466d37dbbdedd0c2386f2b83c3bc7c3873b (patch) | |
tree | 2bd3a08933bf16b658b5e2d0097ce232982a5983 /src/gui/painting | |
parent | dd85cd0a1ce878a126b6b6d34518e173b9cc9d88 (diff) | |
download | Qt-01f42466d37dbbdedd0c2386f2b83c3bc7c3873b.zip Qt-01f42466d37dbbdedd0c2386f2b83c3bc7c3873b.tar.gz Qt-01f42466d37dbbdedd0c2386f2b83c3bc7c3873b.tar.bz2 |
Fix raster graphics on X11 RGB30
The window surface incorrectly assumes that any pixel depth of 24 or
above would be on 8bit/color. This breaks 10bit/color formats like
RGB30. This patch instead make it specifically check for color depth 24
or 32 which are the two with 8bit/color.
Task-number: QTBUG-25998
Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qwindowsurface_raster.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index ae5a591..1f2b3fe 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -256,7 +256,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi { int depth = widget->x11Info().depth(); const QImage &src = d->image->image; - if (src.format() != QImage::Format_RGB32 || depth < 24 || X11->bppForDepth.value(depth) != 32) { + if (src.format() != QImage::Format_RGB32 || (depth != 24 && depth != 32) || X11->bppForDepth.value(depth) != 32) { Q_ASSERT(src.depth() >= 16); const QImage sub_src(src.scanLine(br.y()) + br.x() * (uint(src.depth()) / 8), br.width(), br.height(), src.bytesPerLine(), src.format()); |