Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-qt5][PATCH v3] qtbase: prevent artifacts on raster windows using eglfs plugin
Date: Wed,  5 Mar 2014 09:09:39 +1100	[thread overview]
Message-ID: <1393970979-2785-1-git-send-email-net147@gmail.com> (raw)

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 recipes-qt/qt5/qtbase.inc                          |  1 +
 .../qtbase/0016-eglfs-Fix-quad-coordinates.patch   | 39 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch

diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
index f1a10bb..e5d98df 100644
--- a/recipes-qt/qt5/qtbase.inc
+++ b/recipes-qt/qt5/qtbase.inc
@@ -20,6 +20,7 @@ SRC_URI += "\
     file://0013-QOpenGLPaintDevice-sub-area-support.patch \
     file://0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \
     file://0015-Fix-linuxfb-argument-mmsize-parsing.patch \
+    file://0016-eglfs-Fix-quad-coordinates.patch \
 "
 
 DEPENDS += "qtbase-native"
diff --git a/recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch b/recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch
new file mode 100644
index 0000000..92785e4
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch
@@ -0,0 +1,39 @@
+From 84756d94c73885803ad8044099ab47c0c49b5076 Mon Sep 17 00:00:00 2001
+From: Laszlo Agocs <laszlo.agocs@digia.com>
+Date: Thu, 23 Jan 2014 11:45:22 +0100
+Subject: [PATCH] eglfs: Fix quad coordinates
+
+Prevent artifacts on raster windows by properly mapping
+the coordinates to [-1,1].
+
+Upstream-Status: Backport
+
+Task-number: QTBUG-36370
+Change-Id: I95d0d03952f597ef4ce6a950c6533a3af2df964a
+Reviewed-by: Andy Nichols <andy.nichols@digia.com>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/plugins/platforms/eglfs/qeglfscompositor.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/platforms/eglfs/qeglfscompositor.cpp b/src/plugins/platforms/eglfs/qeglfscompositor.cpp
+index 845bb5b..1efc4f7 100644
+--- a/src/plugins/platforms/eglfs/qeglfscompositor.cpp
++++ b/src/plugins/platforms/eglfs/qeglfscompositor.cpp
+@@ -153,10 +153,11 @@ void QEglFSCompositor::render(QEglFSWindow *window, uint texture, bool raster)
+     QPoint tl = r.topLeft();
+     QPoint br = r.bottomRight();
+ 
++    // Map to [-1,1]
+     GLfloat x1 = (tl.x() / sr.width()) * 2 - 1;
+-    GLfloat x2 = (br.x() / sr.width()) * 2 - 1;
+     GLfloat y1 = ((sr.height() - tl.y()) / sr.height()) * 2 - 1;
+-    GLfloat y2 = ((sr.height() - br.y()) / sr.height()) * 2 - 1;
++    GLfloat x2 = ((br.x() + 1) / sr.width()) * 2 - 1;
++    GLfloat y2 = ((sr.height() - (br.y() + 1)) / sr.height()) * 2 - 1;
+ 
+     if (!raster)
+         qSwap(y1, y2);
+-- 
+1.7.1
+
-- 
1.9.0



                 reply	other threads:[~2014-03-04 22:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393970979-2785-1-git-send-email-net147@gmail.com \
    --to=net147@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox