summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-10 18:33:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-10 18:33:19 (GMT)
commit38e1ed3b51d6aad46912eb548490d038e58203d9 (patch)
treef1c3845add6559fa7edaf84d0be648afac374df5 /src/opengl/qgl.cpp
parent8b43b9e63374f0b83ec15c909a382da173344ca8 (diff)
parent8d88491d44fdbad7e9d6ea618f14b5230e03d6f1 (diff)
downloadQt-38e1ed3b51d6aad46912eb548490d038e58203d9.zip
Qt-38e1ed3b51d6aad46912eb548490d038e58203d9.tar.gz
Qt-38e1ed3b51d6aad46912eb548490d038e58203d9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (21 commits) Fixed tst_qpixmap::grabWidget autotest failure on QWS. Doc: Fixing typo Doc: Fixing typo Doc: Fixing typo Fixed tst_qwidget::testContentsPropagation auto-test failure. Fixed text rendering bug in raster engine when opacity != 1.0. Prevented race condition on texture destruction. More fix for QTBUG-14640:oci performance problem with qlonglong Doc: Fixing typo Fixed grabWidget sometimes returning uninitialized memory. Fix Malayalam Rendering - 'Ra' is PreBase Update .def files for QtGui and QtOpenVG Use 32bit textures for alpha textures after all. One more fix for dithering. Doc: Fixing typo Fix QTBUG-14640:oci performance problem with qlonglong 32bit => 16bit conversion has 4byte-aligned output. Fix gcc bug in qReallocAligned Prevented threading related crash in OpenGL module. Fix possible crash in QStaticText and QDeclarativeTextLayout ...
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index dbd295f..ed9753e 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -127,7 +127,12 @@ Q_GLOBAL_STATIC(QGLDefaultOverlayFormat, defaultOverlayFormatInstance)
Q_GLOBAL_STATIC(QGLSignalProxy, theSignalProxy)
QGLSignalProxy *QGLSignalProxy::instance()
{
- return theSignalProxy();
+ QGLSignalProxy *proxy = theSignalProxy();
+ if (proxy && proxy->thread() != qApp->thread()) {
+ if (proxy->thread() == QThread::currentThread())
+ proxy->moveToThread(qApp->thread());
+ }
+ return proxy;
}
@@ -1637,12 +1642,23 @@ const QGLContext *qt_gl_transfer_context(const QGLContext *ctx)
return 0;
}
+QGLContextPrivate::QGLContextPrivate(QGLContext *context)
+ : internal_context(false)
+ , q_ptr(context)
+{
+ group = new QGLContextGroup(context);
+ texture_destroyer = new QGLTextureDestroyer;
+ texture_destroyer->moveToThread(qApp->thread());
+}
+
QGLContextPrivate::~QGLContextPrivate()
{
if (!group->m_refs.deref()) {
Q_ASSERT(group->context() == q_ptr);
delete group;
}
+
+ delete texture_destroyer;
}
void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)