aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-02 23:41:20 +0100
committerSven Gothel <[email protected]>2023-03-02 23:41:20 +0100
commitbc05d39965ec513a468b841dd1e696c2e371fdd2 (patch)
treebda877e11fc4232312f966cb3a94ceb9eb31b4bd /src
parentc5e68482a747c6d0fef8a4b3fdb1fe098f81965d (diff)
Drop redundant NativeWindowFactory.getDefaultToolkitLock(type, deviceHandle) variant
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/DefaultGraphicsDevice.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java19
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java4
4 files changed, 8 insertions, 25 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
index 868fb4f85..65ada6e09 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
@@ -416,7 +416,7 @@ public class EGLDisplayUtil {
* and {@link #eglTerminate(long)} for {@link EGLGraphicsDevice#close()}.
* </p>
* <p>
- * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
+ * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* </p>
* @param nativeDisplayID
* @param connection
@@ -434,7 +434,7 @@ public class EGLDisplayUtil {
* and {@link #eglTerminate(long)} for {@link EGLGraphicsDevice#close()}.
* </p>
* <p>
- * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
+ * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* </p>
* @param adevice
* @return an uninitialized {@link EGLGraphicsDevice}
@@ -450,7 +450,7 @@ public class EGLDisplayUtil {
* and {@link #eglTerminate(long)} for {@link EGLGraphicsDevice#close()}.
* </p>
* <p>
- * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
+ * Using the default {@link ToolkitLock}, via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* </p>
* @param surface
* @return an uninitialized EGLGraphicsDevice
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/DefaultGraphicsDevice.java
index 56c196132..4210046d6 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/DefaultGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/DefaultGraphicsDevice.java
@@ -72,12 +72,12 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
/**
* Create an instance with the system default {@link ToolkitLock}.
- * gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
+ * gathered via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* @param type
* @param handle
*/
public DefaultGraphicsDevice(final String type, final String connection, final int unitID, final long handle) {
- this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type, handle));
+ this(type, connection, unitID, handle, NativeWindowFactory.getDefaultToolkitLock(type));
}
/**
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
index 332854fcc..29829be18 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/NativeWindowFactory.java
@@ -541,24 +541,6 @@ public abstract class NativeWindowFactory {
}
/**
- * Provides the default {@link ToolkitLock} for <code>type</code> and <code>deviceHandle</code>.
- * <ul>
- * <li> JAWT {@link ToolkitLock} if required and <code>type</code> is of {@link #TYPE_AWT} and AWT available,</li>
- * <li> {@link jogamp.nativewindow.ResourceToolkitLock} if required, otherwise</li>
- * <li> {@link jogamp.nativewindow.NullToolkitLock} </li>
- * </ul>
- */
- public static ToolkitLock getDefaultToolkitLock(final String type, final long deviceHandle) {
- if( requiresToolkitLock ) {
- if( TYPE_AWT == type && isAWTAvailable() ) { // uses .intern()!
- return getAWTToolkitLock();
- }
- return ResourceToolkitLock.create();
- }
- return NativeWindowFactoryImpl.getNullToolkitLock();
- }
-
- /**
* @param device
* @param screen -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screen
* @return newly created AbstractGraphicsScreen matching device's native type
@@ -717,6 +699,7 @@ public abstract class NativeWindowFactory {
public static AbstractGraphicsDevice createDevice(final String displayConnection, final boolean own) {
return createDevice(NativeWindowFactory.getNativeWindowType(true), displayConnection, own);
}
+
/**
* Creates a native device type, following the given {@link #getNativeWindowType(boolean) native-window-type}.
* <p>
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
index 5e706884c..29ed5e8fd 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
@@ -61,11 +61,11 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
}
/** Constructs a new X11GraphicsDevice corresponding to the given native display handle and default
- * {@link com.jogamp.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String, long)}.
+ * {@link com.jogamp.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.
* @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long)
*/
public X11GraphicsDevice(final long display, final int unitID, final boolean owner) {
- this(display, unitID, NativeWindowFactory.getDefaultToolkitLock(NativeWindowFactory.TYPE_X11, display), owner);
+ this(display, unitID, NativeWindowFactory.getDefaultToolkitLock(NativeWindowFactory.TYPE_X11), owner);
}
/**