diff options
author | Michael Dominic K <mdk@codethink.co.uk> | 2010-10-05 14:54:20 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-10-05 14:54:20 (GMT) |
commit | 7bf2de5adf62f45c8d7fcba22e2cf9ea427b5b37 (patch) | |
tree | b8bc11591310092076d282fe379304b17c49c9df /src | |
parent | faba550d704312a29d9485bcaaa506331f102301 (diff) | |
download | Qt-7bf2de5adf62f45c8d7fcba22e2cf9ea427b5b37.zip Qt-7bf2de5adf62f45c8d7fcba22e2cf9ea427b5b37.tar.gz Qt-7bf2de5adf62f45c8d7fcba22e2cf9ea427b5b37.tar.bz2 |
Adding a threshold for partial updates.
Merge-request: 841
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index f98dcff..8157b2a 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -534,8 +534,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & } } #endif - if (d_ptr->paintedRegion.boundingRect() != geometry() && - hasPartialUpdateSupport()) { + if (hasPartialUpdateSupport() && + d_ptr->paintedRegion.boundingRect().width() * d_ptr->paintedRegion.boundingRect().height() < + geometry().width() * geometry().height() * 0.2) { context()->d_func()->swapRegion(&d_ptr->paintedRegion); } else context()->swapBuffers(); |