Skip to content

Commit

Permalink
JRE-526: IDE is unusably slow when using a 4K display on OS X
Browse files Browse the repository at this point in the history
Do not reduce reported max texture size
  • Loading branch information
avu committed Nov 21, 2017
1 parent e95a8ac commit 69ef7da
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/macosx/classes/sun/java2d/opengl/CGLGraphicsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,13 @@ public static CGLGraphicsConfig getConfig(CGraphicsDevice device,
kOpenGLSwapInterval);
if (cfginfo != 0L) {
textureSize = nativeGetMaxTextureSize();
// 7160609: GL still fails to create a square texture of this
// size. Half should be safe enough.
// Explicitly not support a texture more than 2^14, see 8010999.
textureSize = textureSize <= 16384 ? textureSize / 2 : 8192;
// Looks like it is outdated info, moreover on OSX in 4K resolution
// reducing max size of the texture leads to performance degradation
// in scrolling
// // 7160609: GL still fails to create a square texture of this
// // size. Half should be safe enough.
// // Explicitly not support a texture more than 2^14, see 8010999.
// // textureSize = textureSize <= 16384 ? textureSize / 2 : 8192;
OGLContext.setScratchSurface(cfginfo);
rq.flushAndInvokeNow(() -> ids[0] = OGLContext.getOGLIdString());
}
Expand Down

0 comments on commit 69ef7da

Please sign in to comment.