]> git.pld-linux.org Git - packages/qt4.git/blob - 0034-Fix-raster-graphics-on-X11-RGB30.patch
e26d9f24010b5925c5bbb00992594a76ea074da1
[packages/qt4.git] / 0034-Fix-raster-graphics-on-X11-RGB30.patch
1 From 01f42466d37dbbdedd0c2386f2b83c3bc7c3873b Mon Sep 17 00:00:00 2001
2 From: Allan Sandfeld Jensen <allan.jensen@digia.com>
3 Date: Mon, 26 May 2014 09:25:42 +0200
4 Subject: [PATCH 34/37] Fix raster graphics on X11 RGB30
5
6 The window surface incorrectly assumes that any pixel depth of 24 or
7 above would be on 8bit/color. This breaks 10bit/color formats like
8 RGB30. This patch instead make it specifically check for color depth 24
9 or 32 which are the two with 8bit/color.
10
11 Task-number: QTBUG-25998
12 Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
13 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
14 ---
15  src/gui/painting/qwindowsurface_raster.cpp | 2 +-
16  1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
19 index ae5a591..1f2b3fe 100644
20 --- a/src/gui/painting/qwindowsurface_raster.cpp
21 +++ b/src/gui/painting/qwindowsurface_raster.cpp
22 @@ -256,7 +256,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
23      {
24          int depth = widget->x11Info().depth();
25          const QImage &src = d->image->image;
26 -        if (src.format() != QImage::Format_RGB32 || depth < 24 || X11->bppForDepth.value(depth) != 32) {
27 +        if (src.format() != QImage::Format_RGB32 || (depth != 24 && depth != 32) || X11->bppForDepth.value(depth) != 32) {
28              Q_ASSERT(src.depth() >= 16);
29              const QImage sub_src(src.scanLine(br.y()) + br.x() * (uint(src.depth()) / 8),
30                                   br.width(), br.height(), src.bytesPerLine(), src.format());
31 -- 
32 1.9.3
33
This page took 0.042668 seconds and 2 git commands to generate.