diff options
| author | Jonathan Liu <net147@gmail.com> | 2014-03-05 09:09:39 +1100 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-03-05 19:25:36 +0100 |
| commit | 201b3b2c89d77a6ef8ea6e5f6b63929429184994 (patch) | |
| tree | 9574b9b982b41c46f1b2189e1f4087efda940562 | |
| parent | 8c3c6fda694f8d86347d51978d345d476addf59f (diff) | |
| download | meta-qt5-201b3b2c89d77a6ef8ea6e5f6b63929429184994.tar.gz | |
qtbase: prevent artifacts on raster windows using eglfs plugin
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | recipes-qt/qt5/qtbase.inc | 1 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index 98fac85c..8ca89494 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc | |||
| @@ -20,6 +20,7 @@ SRC_URI += "\ | |||
| 20 | file://0013-QOpenGLPaintDevice-sub-area-support.patch \ | 20 | file://0013-QOpenGLPaintDevice-sub-area-support.patch \ |
| 21 | file://0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \ | 21 | file://0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \ |
| 22 | file://0015-Fix-linuxfb-argument-mmsize-parsing.patch \ | 22 | file://0015-Fix-linuxfb-argument-mmsize-parsing.patch \ |
| 23 | file://0016-eglfs-Fix-quad-coordinates.patch \ | ||
| 23 | " | 24 | " |
| 24 | 25 | ||
| 25 | DEPENDS += "qtbase-native" | 26 | 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 00000000..92785e45 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0016-eglfs-Fix-quad-coordinates.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From 84756d94c73885803ad8044099ab47c0c49b5076 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Laszlo Agocs <laszlo.agocs@digia.com> | ||
| 3 | Date: Thu, 23 Jan 2014 11:45:22 +0100 | ||
| 4 | Subject: [PATCH] eglfs: Fix quad coordinates | ||
| 5 | |||
| 6 | Prevent artifacts on raster windows by properly mapping | ||
| 7 | the coordinates to [-1,1]. | ||
| 8 | |||
| 9 | Upstream-Status: Backport | ||
| 10 | |||
| 11 | Task-number: QTBUG-36370 | ||
| 12 | Change-Id: I95d0d03952f597ef4ce6a950c6533a3af2df964a | ||
| 13 | Reviewed-by: Andy Nichols <andy.nichols@digia.com> | ||
| 14 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
| 15 | --- | ||
| 16 | src/plugins/platforms/eglfs/qeglfscompositor.cpp | 5 +++-- | ||
| 17 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/src/plugins/platforms/eglfs/qeglfscompositor.cpp b/src/plugins/platforms/eglfs/qeglfscompositor.cpp | ||
| 20 | index 845bb5b..1efc4f7 100644 | ||
| 21 | --- a/src/plugins/platforms/eglfs/qeglfscompositor.cpp | ||
| 22 | +++ b/src/plugins/platforms/eglfs/qeglfscompositor.cpp | ||
| 23 | @@ -153,10 +153,11 @@ void QEglFSCompositor::render(QEglFSWindow *window, uint texture, bool raster) | ||
| 24 | QPoint tl = r.topLeft(); | ||
| 25 | QPoint br = r.bottomRight(); | ||
| 26 | |||
| 27 | + // Map to [-1,1] | ||
| 28 | GLfloat x1 = (tl.x() / sr.width()) * 2 - 1; | ||
| 29 | - GLfloat x2 = (br.x() / sr.width()) * 2 - 1; | ||
| 30 | GLfloat y1 = ((sr.height() - tl.y()) / sr.height()) * 2 - 1; | ||
| 31 | - GLfloat y2 = ((sr.height() - br.y()) / sr.height()) * 2 - 1; | ||
| 32 | + GLfloat x2 = ((br.x() + 1) / sr.width()) * 2 - 1; | ||
| 33 | + GLfloat y2 = ((sr.height() - (br.y() + 1)) / sr.height()) * 2 - 1; | ||
| 34 | |||
| 35 | if (!raster) | ||
| 36 | qSwap(y1, y2); | ||
| 37 | -- | ||
| 38 | 1.7.1 | ||
| 39 | |||
