eglfs: Fix updates when resizing backing store

We would resize the backing store without resizing the viewport,
which would cause all subsequent blits of the backing store to the
screen to look broken.

Task-number: QTBUG-32146
Change-Id: I65bae051b7cfbbc61fc285e4baa74685d5639569
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2013-07-30 10:13:31 +02:00 committed by The Qt Project
parent f29bbbde5f
commit 87a30db468

View File

@ -79,6 +79,9 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
makeCurrent();
QRectF sr = window->screen()->geometry();
glViewport(0, 0, sr.width(), sr.height());
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglBackingStore::flush %p", window);
#endif
@ -120,7 +123,6 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion &region, const QPo
};
QRectF r = window->geometry();
QRectF sr = window->screen()->geometry();
GLfloat x1 = (r.left() / sr.width()) * 2 - 1;
GLfloat x2 = (r.right() / sr.width()) * 2 - 1;