aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
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/nativewindow
parentc5e68482a747c6d0fef8a4b3fdb1fe098f81965d (diff)
Drop redundant NativeWindowFactory.getDefaultToolkitLock(type, deviceHandle) variant
Diffstat (limited to 'src/nativewindow')
-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
3 files changed, 5 insertions, 22 deletions
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);
}
/**