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>
This commit is contained in:
Laszlo Agocs 2012-08-15 18:17:38 +03:00 committed by Qt by Nokia
parent 38bd71e04d
commit 12491f35bb

View File

@ -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,