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 | |
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')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 3 | ||||
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 13 | ||||
-rw-r--r-- | src/opengl/qwindowsurface_gl_p.h | 3 | ||||
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 8 |
4 files changed, 19 insertions, 8 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 7d6ea12..3a9afe1 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1204,7 +1204,8 @@ void QPainterPath::connectPath(const QPainterPath &other) int first = d->elements.size(); d->elements += other.d_func()->elements; - d->elements[first].type = LineToElement; + if (first != 0) + d->elements[first].type = LineToElement; // avoid duplicate points if (first > 0 && QPointF(d->elements[first]) == QPointF(d->elements[first - 1])) { 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); diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 4a86082..b1a8f5f7 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -75,6 +75,8 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QMeeGoGraphicsSystem::surfaceWasCreated = true; QWindowSurface *surface = new QGLWindowSurface(widget); return surface; @@ -82,12 +84,6 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const { - // Long story short: without this it's possible to hit an - // uninitialized paintDevice due to a Qt bug too complex to even - // explain here... not to mention fix without going crazy. - // MDK - QGLShareContextScope ctx(qt_gl_share_widget()->context()); - return new QRasterPixmapData(type); } |