summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-08-15 18:17:38 +0300
committerQt by Nokia <qt-info@nokia.com>2012-08-22 22:08:54 +0200
commit12491f35bbea7008b15fb0ba0ee7ea5bf6eb6b6c (patch)
treefff36bd433084a34b9e7610f357108172559ab27 /src/plugins
parent38bd71e04da87fc1c92dd94e2eddb62b8944ceeb (diff)
Fix transformation in eglfs backingstore
While not visible with forced-fullscreen windows, the formula used to set up positioning on the Y axis is wrong. (with the GL coordinate system Y goes 1..-1 when moving top-to-bottom) Taken from kms' version of the backingstore which had the formulas corrected. Change-Id: I460a4eec925e47b08453af4e093d719567af22ea Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index 2caf1064cf..8ad0aab522 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -124,8 +124,8 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
GLfloat x1 = (r.left() / sr.width()) * 2 - 1;
GLfloat x2 = (r.right() / sr.width()) * 2 - 1;
- GLfloat y1 = (r.top() / sr.height()) * 2 - 1;
- GLfloat y2 = (r.bottom() / sr.height()) * 2 - 1;
+ GLfloat y1 = -1 * ((r.top() / sr.height()) * 2 - 1);
+ GLfloat y2 = -1 * ((r.bottom() / sr.height()) * 2 - 1);
const GLfloat vertexCoordinates[] = {
x1, y1,