src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java
Print this page
*** 82,96 ****
--- 82,99 ----
private long pConfigInfo;
private ContextCapabilities oglCaps;
private OGLContext context;
private Object disposerReferent = new Object();
+ private final int cachedMaxTextureSize;
+
public static native int getDefaultPixFmt(int screennum);
private static native boolean initCGL();
private static native long getCGLConfigInfo(int screennum, int visualnum,
int swapInterval);
private static native int getOGLCapabilities(long configInfo);
+ private static native int _getMaxTextureSize();
static {
cglAvailable = initCGL();
}
*** 106,115 ****
--- 109,122 ----
// add a record to the Disposer so that we destroy the native
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
+
+ // 7200762: Workaround a deadlock by caching the value
+ // A fix for JDK 8 will remove the workaround
+ this.cachedMaxTextureSize = _getMaxTextureSize();
}
@Override
public Object getProxyKey() {
return this;
*** 498,510 ****
}
totalDisplayBounds.setBounds(virtualBounds);
}
}
// 7160609: GL still fails to create a square texture of this size,
// so we use this value to cap the total display bounds.
! native private static int getMaxTextureSize();
@Override
public int getMaxTextureWidth() {
int width;
--- 505,520 ----
}
totalDisplayBounds.setBounds(virtualBounds);
}
}
+
// 7160609: GL still fails to create a square texture of this size,
// so we use this value to cap the total display bounds.
! private int getMaxTextureSize() {
! return cachedMaxTextureSize;
! }
@Override
public int getMaxTextureWidth() {
int width;