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