提交 14232fa8 编写于 作者: P psadhukhan

8223158: Docked MacBook cannot start any Java Swing applications

Reviewed-by: prr, serb
上级 18a76662
......@@ -220,7 +220,6 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
AWT_ASSERT_APPKIT_THREAD;
jint displayID = (jint)[(NSNumber *)[argValue objectAtIndex: 0] intValue];
jint pixfmt = (jint)[(NSNumber *)[argValue objectAtIndex: 1] intValue];
jint swapInterval = (jint)[(NSNumber *)[argValue objectAtIndex: 2] intValue];
JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
[argValue removeAllObjects];
......@@ -229,11 +228,7 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
CGOpenGLDisplayMask glMask = (CGOpenGLDisplayMask)pixfmt;
if (sharedContext == NULL) {
if (glMask == 0) {
glMask = CGDisplayIDToOpenGLDisplayMask(displayID);
}
NSOpenGLPixelFormatAttribute attrs[] = {
NSOpenGLPFAAllowOfflineRenderers,
......@@ -244,14 +239,15 @@ Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo
NSOpenGLPFAColorSize, 32,
NSOpenGLPFAAlphaSize, 8,
NSOpenGLPFADepthSize, 16,
NSOpenGLPFAScreenMask, glMask,
0
};
sharedPixelFormat =
[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
if (sharedPixelFormat == nil) {
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: shared NSOpenGLPixelFormat is NULL");
J2dRlsTraceLn(J2D_TRACE_ERROR,
"CGLGraphicsConfig_getCGLConfigInfo: shared NSOpenGLPixelFormat is NULL");
[argValue addObject: [NSNumber numberWithLong: 0L]];
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册