diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-05 18:20:10 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-01-05 18:20:10 (GMT) |
commit | 09d2b70f8a23b6c7809117a3c3a77f1ad188957b (patch) | |
tree | 981397a6e4ce9d3bda0f7c121c11d91745ad15e4 /src/opengl | |
parent | c97d1667a2a885c1840f28ca0f7f8a81c0e9759d (diff) | |
parent | 3a6bbedcea2b5ef15077a67c58e9e59abe904014 (diff) | |
download | Qt-09d2b70f8a23b6c7809117a3c3a77f1ad188957b.zip Qt-09d2b70f8a23b6c7809117a3c3a77f1ad188957b.tar.gz Qt-09d2b70f8a23b6c7809117a3c3a77f1ad188957b.tar.bz2 |
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration:
Fix outdated tests
Fix def file names for libinfixed testlib
Generate freeze targets in Symbian
QMeeGoGraphicsSystemHelper::setSwapBehavior implementation.
Support for swap modes in QGLWindowSurface.
Pre-create the GL share widget before window surface creation.
QMeeGoSwitchEvent exported and static.
Fixed first element being a LineToElement in QPainterPath::connectPath()
Update visual tests
Ignore static_and_shared in Symbian builds.
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 13 | ||||
-rw-r--r-- | src/opengl/qwindowsurface_gl_p.h | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 6185ff8..2876906 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -302,6 +302,7 @@ struct QGLWindowSurfacePrivate }; QGLFormat QGLWindowSurface::surfaceFormat; +QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior = QGLWindowSurface::AutomaticSwap; void QGLWindowSurfaceGLPaintDevice::endPaint() { @@ -576,6 +577,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & const GLenum target = GL_TEXTURE_2D; Q_UNUSED(target); + if (QGLWindowSurface::swapBehavior == QGLWindowSurface::KillSwap) + return; + if (context()) { context()->makeCurrent(); @@ -623,7 +627,14 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & } } #endif - bool doingPartialUpdate = hasPartialUpdateSupport() && br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2; + bool doingPartialUpdate = false; + if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AutomaticSwap) + doingPartialUpdate = hasPartialUpdateSupport() && br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2; + else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysFullSwap) + doingPartialUpdate = false; + else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysPartialSwap) + doingPartialUpdate = hasPartialUpdateSupport(); + QGLContext *ctx = reinterpret_cast<QGLContext *>(parent->d_func()->extraData()->glContext); if (widget != window()) { if (initializeOffscreenTexture(window()->size())) diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h index 22bd5f0..09a6a30 100644 --- a/src/opengl/qwindowsurface_gl_p.h +++ b/src/opengl/qwindowsurface_gl_p.h @@ -112,6 +112,9 @@ public: static QGLFormat surfaceFormat; + enum SwapMode { AutomaticSwap, AlwaysFullSwap, AlwaysPartialSwap, KillSwap }; + static SwapMode swapBehavior; + private slots: void deleted(QObject *object); |