From 5d33b0a3ef993ff2d257c90abc3d84bc93269cd0 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Thu, 13 Oct 2011 13:02:32 +0200
Subject: MacOSX: Fix shared ctx release [onMainThread]; Make GLContextShareSet
 lifecycle deterministic; Remove warnings

Fix shared ctx release [onMainThread]
  - Releasing the shared contexts caused a freeze of about 10s from one of the shared release operations.
    [NSOpenGLContext release]
  - Thorough triage concluded the workaround to release the shared ctx on the main thread.
  - Using enhanced GLContextShareSet, see below

Make GLContextShareSet lifecycle deterministic
  - Programmatically control the lifecycle of tracked shared ctx allows us using 'hard' references.
  - Features queries for isShared() and ofc unregister a share set if all are destroyed.

Remove warnings
  - MacOSXWindowSystemInterface.m used 'long', where 'GLint' was requested.
---
 make/stub_includes/opengl/macosx-window-system.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'make/stub_includes/opengl/macosx-window-system.h')

diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
index 8e6d5ba2d..65d8e41f7 100644
--- a/make/stub_includes/opengl/macosx-window-system.h
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -29,7 +29,7 @@ void* createContext(void* shareContext,
 void *getCGLContext(void* nsContext);
 Bool  makeCurrentContext(void* nsContext);
 Bool  clearCurrentContext(void *nsContext);
-Bool  deleteContext(void* nsContext);
+Bool  deleteContext(void* nsContext, Bool releaseOnMainThread);
 Bool  flushBuffer(void* nsContext);
 void  setContextOpacity(void* nsContext, int opacity);
 void  updateContext(void* nsContext);
-- 
cgit v1.2.3