diff options
author | Sven Gothel <[email protected]> | 2011-11-26 08:24:56 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-26 08:24:56 +0100 |
commit | 26e6aac665d0fede32c322b66d90e82a622624ac (patch) | |
tree | 9d83021273fc3cdfb27359478833522356d21f2c /src/jogl/classes/jogamp/opengl/windows/wgl | |
parent | 6c1aa039afc4b81eeacdc97993cd7c7b2efc6ea4 (diff) |
SharedResourceRunner: Use generics ; X11GLXDrawableFactory.SharedRunnable shutdown: don't attempt to close Display device.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 3cbe5c8e5..9838ba156 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -128,7 +128,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { SharedResourceImplementation sharedResourceImpl; SharedResourceRunner sharedResourceRunner; Thread sharedResourceThread; - HashMap/*<connection, SharedResource>*/ sharedMap = new HashMap(); + HashMap<String /*connection*/, SharedResourceRunner.Resource> sharedMap = new HashMap<String, SharedResourceRunner.Resource>(); long processAffinityChanges = 0; PointerBuffer procMask = PointerBuffer.allocateDirect(1); @@ -250,15 +250,15 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { } public SharedResourceRunner.Resource mapPut(String connection, SharedResourceRunner.Resource resource) { synchronized(sharedMap) { - return (SharedResourceRunner.Resource) sharedMap.put(connection, resource); + return sharedMap.put(connection, resource); } } public SharedResourceRunner.Resource mapGet(String connection) { synchronized(sharedMap) { - return (SharedResourceRunner.Resource) sharedMap.get(connection); + return sharedMap.get(connection); } } - public Collection/*<Resource>*/ mapValues() { + public Collection<SharedResourceRunner.Resource> mapValues() { synchronized(sharedMap) { return sharedMap.values(); } @@ -269,9 +269,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { sharedDevice.lock(); try { AbstractGraphicsScreen absScreen = new DefaultGraphicsScreen(sharedDevice, 0); - if (null == absScreen) { - throw new GLException("Couldn't create shared screen for device: "+sharedDevice+", idx 0"); - } GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP); if (null == glp) { throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice); |