diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-01-05 07:25:56 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-01-07 06:56:31 (GMT) |
commit | e185e5f008f6852bd7a79d74262717c8e377b918 (patch) | |
tree | e8eb972abaa4db4e35c47c0415f81c0c23ee2f13 | |
parent | 9cc21c043238dc7576a465c9d236e8968fd8c549 (diff) | |
download | Qt-e185e5f008f6852bd7a79d74262717c8e377b918.zip Qt-e185e5f008f6852bd7a79d74262717c8e377b918.tar.gz Qt-e185e5f008f6852bd7a79d74262717c8e377b918.tar.bz2 |
Restored old flushing behavior in -graphicssystem opengl on desktop.
Change 284211ccbd2cbd recently introduced a fix for EGL, to prevent
flushing when nothing has been rendered into the back buffer. However,
the skip should only be done when there's no partial update support in
the window surface. If there is partial update support we can still
flush as usual.
Reviewed-by: Gunnar Sletta
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index b8716ce..7243f02 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -520,9 +520,10 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & // did_paint is set to true in ::beginPaint. ::beginPaint means that we // at least cleared the background (= painted something). In EGL API it's a - // mistakte to call swapBuffers if nothing was painted. This check protects - // the flush func from being executed if it's for nothing. - if (!d_ptr->did_paint) + // mistake to call swapBuffers if nothing was painted unless + // EGL_BUFFER_PRESERVED is set. This check protects the flush func from + // being executed if it's for nothing. + if (!hasPartialUpdateSupport() && !d_ptr->did_paint) return; QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); |