From 7dabd65ff61b2665821a101fc3f683270986ded8 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 24 Nov 2011 16:38:40 +0100 Subject: Make cocoa opengl backend threadsafe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qcocoaglcontext.mm | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm') 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; } -- cgit v1.2.3