From d6203cfeb0e096575c1fc0254dddc07a3d65d24c Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 21 Jul 2010 11:17:33 +0200 Subject: Do check after all if we have partialUpdateSupport. Task-number: QTBUG-12266 Merge-request: 752 Reviewed-by: Trond --- src/opengl/qwindowsurface_gl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index e9da452..6b82ed3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -494,10 +494,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & } } #endif - if (d_ptr->paintedRegion.boundingRect() != geometry()) { - // Emits warning if not supported. Should never happen unless - // setPartialUpdateSupport(true) has been called. - context()->d_func()->swapRegion(&d_ptr->paintedRegion); + if (d_ptr->paintedRegion.boundingRect() != geometry() && + hasPartialUpdateSupport()) { + context()->d_func()->swapRegion(&d_ptr->paintedRegion); } else context()->swapBuffers(); -- cgit v0.12