[yocto] [meta-qt4][PATCH] qt4: add patch which fixes 24-bit color depth

Stefan Agner stefan at agner.ch
Tue Oct 25 15:32:08 PDT 2016


From: Stefan Agner <stefan.agner at toradex.com>

Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
---
 recipes-qt4/qt4/qt4-4.8.7.inc                      |  1 +
 .../0001-QWS-fix-24-bit-RGB-BGR-handling.patch     | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-qt4/qt4/qt4-4.8.7/0001-QWS-fix-24-bit-RGB-BGR-handling.patch

diff --git a/recipes-qt4/qt4/qt4-4.8.7.inc b/recipes-qt4/qt4/qt4-4.8.7.inc
index 5ecf7fd..16b22a8 100644
--- a/recipes-qt4/qt4/qt4-4.8.7.inc
+++ b/recipes-qt4/qt4/qt4-4.8.7.inc
@@ -30,6 +30,7 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
            file://gcc-6.patch \
            file://Fix-QWSLock-invalid-argument-logs.patch \
            file://add_check_for_aarch64_32.patch \
+           file://0001-QWS-fix-24-bit-RGB-BGR-handling.patch \
            file://g++.conf \
            file://linux.conf \
            file://fix-for-mips-n32.patch \
diff --git a/recipes-qt4/qt4/qt4-4.8.7/0001-QWS-fix-24-bit-RGB-BGR-handling.patch b/recipes-qt4/qt4/qt4-4.8.7/0001-QWS-fix-24-bit-RGB-BGR-handling.patch
new file mode 100644
index 0000000..45856b0
--- /dev/null
+++ b/recipes-qt4/qt4/qt4-4.8.7/0001-QWS-fix-24-bit-RGB-BGR-handling.patch
@@ -0,0 +1,36 @@
+From 9722a85dd2b4a7210af66e2a135fe7aded5075c7 Mon Sep 17 00:00:00 2001
+From: Stefan Agner <stefan.agner at toradex.com>
+Date: Tue, 25 Oct 2016 14:37:02 -0700
+Subject: [PATCH] QWS: fix 24 bit RGB/BGR handling
+
+Use blit_24 for default 24-bit RGB case. This makes sure Qt works
+well with frame buffer using [23:0] R:G:B (little endian) pixel
+format. See also:
+https://bugreports.qt.io/browse/QTBUG-56740
+
+Upstream-Status: Submitted
+
+Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
+---
+ src/gui/embedded/qscreen_qws.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
+index 407366c..a4ece07 100644
+--- a/src/gui/embedded/qscreen_qws.cpp
++++ b/src/gui/embedded/qscreen_qws.cpp
+@@ -1208,9 +1208,9 @@ void qt_blit_setup(QScreen *screen, const QImage &image,
+ #ifdef QT_QWS_DEPTH_24
+     case 24:
+         if (screen->pixelType() == QScreen::NormalPixel)
+-            screen->d_ptr->blit = blit_qrgb888;
+-        else
+             screen->d_ptr->blit = blit_24;
++        else
++            screen->d_ptr->blit = blit_qrgb888;
+         break;
+ #endif
+ #ifdef QT_QWS_DEPTH_18
+-- 
+2.10.0
+
-- 
1.9.1




More information about the yocto mailing list