diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-05-26 22:34:29 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-30 11:10:42 +0200 |
commit | e18569ee1dfe1bf33ae2130d09417152a25d3760 (patch) | |
tree | 24cd18ef1921fe74f6c0e696bdb8fc83866c5ca5 /src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | |
parent | 0cb7dac534049ebda607a9a2cdde2f7c7d9533c2 (diff) |
eglfs: keep context active only during flush
The OpenGL context needs to be current only while flushing
the backing store.
Change-Id: I4d6a10f22bcfe04f35a14a690180237f6c691829
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp index a3b3277c8d..539e4be331 100644 --- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp +++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp @@ -76,6 +76,8 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo Q_UNUSED(region); Q_UNUSED(offset); + makeCurrent(); + #ifdef QEGL_EXTRA_DEBUG qWarning("QEglBackingStore::flush %p", window); #endif @@ -183,6 +185,8 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo cursor->render(); m_context->swapBuffers(window); + + m_context->doneCurrent(); } void QEglFSBackingStore::makeCurrent() @@ -195,8 +199,6 @@ void QEglFSBackingStore::makeCurrent() void QEglFSBackingStore::beginPaint(const QRegion &rgn) { - makeCurrent(); - m_dirty = m_dirty | rgn; } |