Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8261399: Cleanup code based on code review comments
  • Loading branch information
jayathirthrao committed Feb 9, 2021
1 parent 0ef1310 commit 131a603276b1a97f78ed8c0b7a90222ee77fb2d8
@@ -32,7 +32,6 @@
import java.awt.image.ColorModel;

import sun.java2d.SurfaceData;
import sun.java2d.opengl.CGLLayer;
import sun.lwawt.LWGraphicsConfig;
import sun.lwawt.macosx.CFRetainedResource;

@@ -128,10 +128,8 @@ public static void invalidateCurrentContext() {
*/
@Native
static final int CAPS_EXT_GRAD_SHADER = (FIRST_PRIVATE_CAP << 3);
/** Indicates the presence of the GL_ARB_texture_rectangle extension. */
@Native
static final int CAPS_EXT_TEXRECT = (FIRST_PRIVATE_CAP << 4);
/** Indicates the presence of the GL_NV_texture_barrier extension. */
@Native
static final int CAPS_EXT_TEXBARRIER = (FIRST_PRIVATE_CAP << 5);

@@ -152,9 +152,9 @@ public static MTLGraphicsConfig getConfig(CGraphicsDevice device,
cfginfo = getMTLConfigInfo(displayID, mtlShadersLib);
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.
// TODO : This clamping code is same as in OpenGL.
// Whether we need such clamping or not in case of Metal
// will be pursued under 8260644
textureSize = textureSize <= 16384 ? textureSize / 2 : 8192;
MTLContext.setScratchSurface(cfginfo);
}
@@ -137,9 +137,9 @@ public static CGLGraphicsConfig getConfig(CGraphicsDevice device)
cfginfo = getCGLConfigInfo();
if (cfginfo != 0L) {
textureSize = nativeGetMaxTextureSize();
// TODO : This clamping code is same as in OpenGL.
// Whether we need such clamping or not in case of Metal
// will be pursued under 8260644
// 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(() -> {

0 comments on commit 131a603

Please sign in to comment.