72
72
public final class MTLGraphicsConfig extends CGraphicsConfig
73
73
implements AccelGraphicsConfig , SurfaceManager .ProxiedGraphicsConfig
74
74
{
75
- private static boolean mtlAvailable ;
76
75
private static ImageCapabilities imageCaps = new MTLImageCaps ();
77
76
78
77
@ SuppressWarnings ("removal" )
@@ -89,7 +88,6 @@ public final class MTLGraphicsConfig extends CGraphicsConfig
89
88
private final Object disposerReferent = new Object ();
90
89
private final int maxTextureSize ;
91
90
92
- private static native boolean isMetalFrameworkAvailable ();
93
91
private static native boolean tryLoadMetalLibrary (int displayID , String shaderLib );
94
92
private static native long getMTLConfigInfo (int displayID , String mtlShadersLib );
95
93
@@ -99,10 +97,6 @@ public final class MTLGraphicsConfig extends CGraphicsConfig
99
97
*/
100
98
private static native int nativeGetMaxTextureSize ();
101
99
102
- static {
103
- mtlAvailable = isMetalFrameworkAvailable ();
104
- }
105
-
106
100
private MTLGraphicsConfig (CGraphicsDevice device ,
107
101
long configInfo , int maxTextureSize ,
108
102
ContextCapabilities mtlCaps ) {
@@ -133,10 +127,6 @@ public SurfaceData createManagedSurface(int w, int h, int transparency) {
133
127
public static MTLGraphicsConfig getConfig (CGraphicsDevice device ,
134
128
int displayID )
135
129
{
136
- if (!mtlAvailable ) {
137
- return null ;
138
- }
139
-
140
130
if (!tryLoadMetalLibrary (displayID , mtlShadersLib )) {
141
131
return null ;
142
132
}
@@ -171,10 +161,6 @@ public static MTLGraphicsConfig getConfig(CGraphicsDevice device,
171
161
return new MTLGraphicsConfig (device , cfginfo , textureSize , caps );
172
162
}
173
163
174
- public static boolean isMetalAvailable () {
175
- return mtlAvailable ;
176
- }
177
-
178
164
/**
179
165
* Returns true if the provided capability bit is present for this config.
180
166
* See MTLContext.java for a list of supported capabilities.
0 commit comments