diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-08 20:28:14 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-08 20:28:14 (GMT) |
commit | 8d8f14314138139c8e538763fb6bb12f214587cf (patch) | |
tree | ffce3a537f094808b95aea14cae99c293f3f3bcc /src/opengl/qgl.cpp | |
parent | 198d903fa18d9f1d51615974d71de8236e97c2cd (diff) | |
parent | 285855b8fbbdc7ad428a0c66f6c4469d97e55769 (diff) | |
download | Qt-8d8f14314138139c8e538763fb6bb12f214587cf.zip Qt-8d8f14314138139c8e538763fb6bb12f214587cf.tar.gz Qt-8d8f14314138139c8e538763fb6bb12f214587cf.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:
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
Fix QTBUG-14132 oracle (xe) stored procedures with bind variables get errors
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 18 |
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) |