diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-11-24 16:38:40 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-25 09:54:38 +0100 |
commit | 7dabd65ff61b2665821a101fc3f683270986ded8 (patch) | |
tree | f9b75614255ca8e216723932b227b601b36470cf /src/plugins/platforms/cocoa/qcocoaglcontext.mm | |
parent | e08410ab8db3d7cabf4ef2fc4de40bb6da6d6fef (diff) |
Make cocoa opengl backend threadsafe.
The current implementation on Mac OS X called update() inside
the cocoa plugin from the GUI thread, which breaks when trying
to use the GL context from another thread and the window gets
resized. We now only call it from makeCurrent()
Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index bc9f55df62..2b21f08601 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -86,6 +86,7 @@ bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface) setActiveWindow(window); [m_context makeCurrentContext]; + update(); return true; } |