summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-07-30 10:13:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-31 10:44:49 +0200
commit87a30db468b187c9c667feefdb31a63028ee9fad (patch)
treedab58a1693ad50dd74aafc4fbe8b676020ad6612 /src/plugins/platforms
parentf29bbbde5fa2c8b095d3317d3f935f46febe04ca (diff)
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>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index eccb7f42c5..e09154bb59 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -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;