diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-08-15 18:17:38 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-22 22:08:54 +0200 |
commit | 12491f35bbea7008b15fb0ba0ee7ea5bf6eb6b6c (patch) | |
tree | fff36bd433084a34b9e7610f357108172559ab27 /src/plugins/platforms/eglfs | |
parent | 38bd71e04da87fc1c92dd94e2eddb62b8944ceeb (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/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | 4 |
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 ®ion, 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, |