author | serb |
Tue, 27 Aug 2019 04:43:01 -0700 | |
changeset 58315 | 07556f8cd819 |
parent 54873 | 442e683e65fa |
child 58601 | 70968bcc110c |
permissions | -rw-r--r-- |
12047 | 1 |
/* |
54873
442e683e65fa
7141393: [macosx] CARemoteLayer code refactoring and unit test
serb
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
12047 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
32872 | 26 |
#import "sun_java2d_opengl_CGLGraphicsConfig.h" |
27 |
||
28 |
#import "CGLGraphicsConfig.h" |
|
29 |
#import "CGLSurfaceData.h" |
|
30 |
#import "ThreadUtilities.h" |
|
31 |
||
12047 | 32 |
#import <stdlib.h> |
33 |
#import <string.h> |
|
34 |
#import <ApplicationServices/ApplicationServices.h> |
|
35 |
#import <JavaNativeFoundation/JavaNativeFoundation.h> |
|
36 |
||
37 |
#pragma mark - |
|
38 |
#pragma mark "--- Mac OS X specific methods for GL pipeline ---" |
|
39 |
||
40 |
/** |
|
41 |
* Disposes all memory and resources associated with the given |
|
42 |
* CGLGraphicsConfigInfo (including its native OGLContext data). |
|
43 |
*/ |
|
44 |
void |
|
45 |
OGLGC_DestroyOGLGraphicsConfig(jlong pConfigInfo) |
|
46 |
{ |
|
47 |
J2dTraceLn(J2D_TRACE_INFO, "OGLGC_DestroyOGLGraphicsConfig"); |
|
48 |
||
49 |
CGLGraphicsConfigInfo *cglinfo = |
|
50 |
(CGLGraphicsConfigInfo *)jlong_to_ptr(pConfigInfo); |
|
51 |
if (cglinfo == NULL) { |
|
52 |
J2dRlsTraceLn(J2D_TRACE_ERROR, |
|
53 |
"OGLGC_DestroyOGLGraphicsConfig: info is null"); |
|
54 |
return; |
|
55 |
} |
|
56 |
||
57 |
OGLContext *oglc = (OGLContext*)cglinfo->context; |
|
58 |
if (oglc != NULL) { |
|
59 |
OGLContext_DestroyContextResources(oglc); |
|
60 |
||
61 |
CGLCtxInfo *ctxinfo = (CGLCtxInfo *)oglc->ctxInfo; |
|
62 |
if (ctxinfo != NULL) { |
|
31661
a5cb86f2253b
7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents:
27510
diff
changeset
|
63 |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; |
12047 | 64 |
[NSOpenGLContext clearCurrentContext]; |
65 |
[ctxinfo->context clearDrawable]; |
|
66 |
[ctxinfo->context release]; |
|
67 |
if (ctxinfo->scratchSurface != 0) { |
|
68 |
[ctxinfo->scratchSurface release]; |
|
69 |
} |
|
13002
4a1b60b6782a
7176644: [macosx] Missing NSAutoreleasePool in CGLGraphicsConfig.m OGLGC_DestroyOGLGraphicsConfig
anthony
parents:
12047
diff
changeset
|
70 |
[pool drain]; |
12047 | 71 |
free(ctxinfo); |
27510
573e93cd3123
8057830: Crash in Java2D Queue Flusher, OGLSD_SetScratchSurface
serb
parents:
26751
diff
changeset
|
72 |
oglc->ctxInfo = NULL; |
12047 | 73 |
} |
27510
573e93cd3123
8057830: Crash in Java2D Queue Flusher, OGLSD_SetScratchSurface
serb
parents:
26751
diff
changeset
|
74 |
cglinfo->context = NULL; |
12047 | 75 |
} |
76 |
||
77 |
free(cglinfo); |
|
78 |
} |
|
79 |
||
80 |
#pragma mark - |
|
81 |
#pragma mark "--- CGLGraphicsConfig methods ---" |
|
82 |
||
83 |
/** |
|
84 |
* This is a globally shared context used when creating textures. When any |
|
85 |
* new contexts are created, they specify this context as the "share list" |
|
86 |
* context, which means any texture objects created when this shared context |
|
87 |
* is current will be available to any other context in any other thread. |
|
88 |
*/ |
|
89 |
NSOpenGLContext *sharedContext = NULL; |
|
90 |
NSOpenGLPixelFormat *sharedPixelFormat = NULL; |
|
91 |
||
92 |
/** |
|
93 |
* Attempts to initialize CGL and the core OpenGL library. |
|
94 |
*/ |
|
95 |
JNIEXPORT jboolean JNICALL |
|
96 |
Java_sun_java2d_opengl_CGLGraphicsConfig_initCGL |
|
97 |
(JNIEnv *env, jclass cglgc) |
|
98 |
{ |
|
99 |
J2dRlsTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig_initCGL"); |
|
100 |
||
101 |
if (!OGLFuncs_OpenLibrary()) { |
|
102 |
return JNI_FALSE; |
|
103 |
} |
|
104 |
||
105 |
if (!OGLFuncs_InitPlatformFuncs() || |
|
106 |
!OGLFuncs_InitBaseFuncs() || |
|
107 |
!OGLFuncs_InitExtFuncs()) |
|
108 |
{ |
|
109 |
OGLFuncs_CloseLibrary(); |
|
110 |
return JNI_FALSE; |
|
111 |
} |
|
112 |
return JNI_TRUE; |
|
113 |
} |
|
114 |
||
115 |
||
116 |
/** |
|
117 |
* Determines whether the CGL pipeline can be used for a given GraphicsConfig |
|
118 |
* provided its screen number and visual ID. If the minimum requirements are |
|
119 |
* met, the native CGLGraphicsConfigInfo structure is initialized for this |
|
120 |
* GraphicsConfig with the necessary information (pixel format, etc.) |
|
121 |
* and a pointer to this structure is returned as a jlong. If |
|
122 |
* initialization fails at any point, zero is returned, indicating that CGL |
|
123 |
* cannot be used for this GraphicsConfig (we should fallback on an existing |
|
124 |
* 2D pipeline). |
|
125 |
*/ |
|
126 |
JNIEXPORT jlong JNICALL |
|
127 |
Java_sun_java2d_opengl_CGLGraphicsConfig_getCGLConfigInfo |
|
128 |
(JNIEnv *env, jclass cglgc, |
|
15988 | 129 |
jint displayID, jint pixfmt, jint swapInterval) |
12047 | 130 |
{ |
131 |
jlong ret = 0L; |
|
132 |
JNF_COCOA_ENTER(env); |
|
133 |
NSMutableArray * retArray = [NSMutableArray arrayWithCapacity:3]; |
|
15988 | 134 |
[retArray addObject: [NSNumber numberWithInt: (int)displayID]]; |
12047 | 135 |
[retArray addObject: [NSNumber numberWithInt: (int)pixfmt]]; |
136 |
[retArray addObject: [NSNumber numberWithInt: (int)swapInterval]]; |
|
137 |
if ([NSThread isMainThread]) { |
|
138 |
[GraphicsConfigUtil _getCGLConfigInfo: retArray]; |
|
139 |
} else { |
|
140 |
[GraphicsConfigUtil performSelectorOnMainThread: @selector(_getCGLConfigInfo:) withObject: retArray waitUntilDone: YES]; |
|
141 |
} |
|
142 |
NSNumber * num = (NSNumber *)[retArray objectAtIndex: 0]; |
|
143 |
ret = (jlong)[num longValue]; |
|
144 |
JNF_COCOA_EXIT(env); |
|
145 |
return ret; |
|
146 |
} |
|
147 |
||
148 |
||
149 |
||
150 |
@implementation GraphicsConfigUtil |
|
151 |
+ (void) _getCGLConfigInfo: (NSMutableArray *)argValue { |
|
152 |
AWT_ASSERT_APPKIT_THREAD; |
|
153 |
||
15988 | 154 |
jint displayID = (jint)[(NSNumber *)[argValue objectAtIndex: 0] intValue]; |
12047 | 155 |
jint pixfmt = (jint)[(NSNumber *)[argValue objectAtIndex: 1] intValue]; |
156 |
jint swapInterval = (jint)[(NSNumber *)[argValue objectAtIndex: 2] intValue]; |
|
157 |
JNIEnv *env = [ThreadUtilities getJNIEnvUncached]; |
|
158 |
[argValue removeAllObjects]; |
|
159 |
||
160 |
J2dRlsTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig_getCGLConfigInfo"); |
|
161 |
||
162 |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; |
|
163 |
||
164 |
CGOpenGLDisplayMask glMask = (CGOpenGLDisplayMask)pixfmt; |
|
165 |
if (sharedContext == NULL) { |
|
166 |
if (glMask == 0) { |
|
15988 | 167 |
glMask = CGDisplayIDToOpenGLDisplayMask(displayID); |
12047 | 168 |
} |
169 |
||
170 |
NSOpenGLPixelFormatAttribute attrs[] = { |
|
33513
1804980c8ed7
8041900: [macosx] Java forces the use of discrete GPU
serb
parents:
32872
diff
changeset
|
171 |
NSOpenGLPFAAllowOfflineRenderers, |
12047 | 172 |
NSOpenGLPFAClosestPolicy, |
173 |
NSOpenGLPFAWindow, |
|
174 |
NSOpenGLPFAPixelBuffer, |
|
175 |
NSOpenGLPFADoubleBuffer, |
|
176 |
NSOpenGLPFAColorSize, 32, |
|
177 |
NSOpenGLPFAAlphaSize, 8, |
|
178 |
NSOpenGLPFADepthSize, 16, |
|
179 |
NSOpenGLPFAScreenMask, glMask, |
|
180 |
0 |
|
181 |
}; |
|
182 |
||
183 |
sharedPixelFormat = |
|
184 |
[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]; |
|
185 |
if (sharedPixelFormat == nil) { |
|
186 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: shared NSOpenGLPixelFormat is NULL"); |
|
187 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
188 |
return; |
|
189 |
} |
|
190 |
||
191 |
sharedContext = |
|
192 |
[[NSOpenGLContext alloc] |
|
193 |
initWithFormat:sharedPixelFormat |
|
194 |
shareContext: NULL]; |
|
195 |
if (sharedContext == nil) { |
|
196 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: shared NSOpenGLContext is NULL"); |
|
197 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
198 |
return; |
|
199 |
} |
|
200 |
} |
|
201 |
||
202 |
#if USE_NSVIEW_FOR_SCRATCH |
|
203 |
NSRect contentRect = NSMakeRect(0, 0, 64, 64); |
|
204 |
NSWindow *window = |
|
205 |
[[NSWindow alloc] |
|
206 |
initWithContentRect: contentRect |
|
207 |
styleMask: NSBorderlessWindowMask |
|
208 |
backing: NSBackingStoreBuffered |
|
209 |
defer: false]; |
|
210 |
if (window == nil) { |
|
211 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: NSWindow is NULL"); |
|
212 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
213 |
return; |
|
214 |
} |
|
215 |
||
216 |
NSView *scratchSurface = |
|
217 |
[[NSView alloc] |
|
218 |
initWithFrame: contentRect]; |
|
219 |
if (scratchSurface == nil) { |
|
220 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: NSView is NULL"); |
|
221 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
222 |
return; |
|
223 |
} |
|
224 |
[window setContentView: scratchSurface]; |
|
225 |
#else |
|
226 |
NSOpenGLPixelBuffer *scratchSurface = |
|
227 |
[[NSOpenGLPixelBuffer alloc] |
|
228 |
initWithTextureTarget:GL_TEXTURE_2D |
|
229 |
textureInternalFormat:GL_RGB |
|
230 |
textureMaxMipMapLevel:0 |
|
231 |
pixelsWide:64 |
|
232 |
pixelsHigh:64]; |
|
233 |
#endif |
|
234 |
||
235 |
NSOpenGLContext *context = |
|
236 |
[[NSOpenGLContext alloc] |
|
237 |
initWithFormat: sharedPixelFormat |
|
238 |
shareContext: sharedContext]; |
|
239 |
if (context == nil) { |
|
240 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: NSOpenGLContext is NULL"); |
|
241 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
242 |
return; |
|
243 |
} |
|
244 |
||
245 |
GLint contextVirtualScreen = [context currentVirtualScreen]; |
|
246 |
#if USE_NSVIEW_FOR_SCRATCH |
|
247 |
[context setView: scratchSurface]; |
|
248 |
#else |
|
249 |
[context |
|
250 |
setPixelBuffer: scratchSurface |
|
251 |
cubeMapFace:0 |
|
252 |
mipMapLevel:0 |
|
253 |
currentVirtualScreen: contextVirtualScreen]; |
|
254 |
#endif |
|
255 |
[context makeCurrentContext]; |
|
256 |
||
257 |
// get version and extension strings |
|
258 |
const unsigned char *versionstr = j2d_glGetString(GL_VERSION); |
|
259 |
if (!OGLContext_IsVersionSupported(versionstr)) { |
|
260 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: OpenGL 1.2 is required"); |
|
261 |
[NSOpenGLContext clearCurrentContext]; |
|
262 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
263 |
return; |
|
264 |
} |
|
265 |
J2dRlsTraceLn1(J2D_TRACE_INFO, "CGLGraphicsConfig_getCGLConfigInfo: OpenGL version=%s", versionstr); |
|
266 |
||
267 |
jint caps = CAPS_EMPTY; |
|
268 |
OGLContext_GetExtensionInfo(env, &caps); |
|
269 |
||
270 |
GLint value = 0; |
|
271 |
[sharedPixelFormat |
|
272 |
getValues: &value |
|
273 |
forAttribute: NSOpenGLPFADoubleBuffer |
|
274 |
forVirtualScreen: contextVirtualScreen]; |
|
275 |
if (value != 0) { |
|
276 |
caps |= CAPS_DOUBLEBUFFERED; |
|
277 |
} |
|
278 |
||
31661
a5cb86f2253b
7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents:
27510
diff
changeset
|
279 |
J2dRlsTraceLn1(J2D_TRACE_INFO, |
a5cb86f2253b
7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents:
27510
diff
changeset
|
280 |
"CGLGraphicsConfig_getCGLConfigInfo: db=%d", |
a5cb86f2253b
7188942: Remove support of pbuffers in OGL Java2d pipeline
serb
parents:
27510
diff
changeset
|
281 |
(caps & CAPS_DOUBLEBUFFERED) != 0); |
12047 | 282 |
|
283 |
// remove before shipping (?) |
|
284 |
#if 1 |
|
285 |
[sharedPixelFormat |
|
286 |
getValues: &value |
|
287 |
forAttribute: NSOpenGLPFAAccelerated |
|
288 |
forVirtualScreen: contextVirtualScreen]; |
|
289 |
if (value == 0) { |
|
290 |
[sharedPixelFormat |
|
291 |
getValues: &value |
|
292 |
forAttribute: NSOpenGLPFARendererID |
|
293 |
forVirtualScreen: contextVirtualScreen]; |
|
294 |
fprintf(stderr, "WARNING: GL pipe is running in software mode (Renderer ID=0x%x)\n", (int)value); |
|
295 |
} |
|
296 |
#endif |
|
297 |
||
298 |
// 0: the buffers are swapped with no regard to the vertical refresh rate |
|
299 |
// 1: the buffers are swapped only during the vertical retrace |
|
300 |
GLint params = swapInterval; |
|
301 |
[context setValues: ¶ms forParameter: NSOpenGLCPSwapInterval]; |
|
302 |
||
303 |
CGLCtxInfo *ctxinfo = (CGLCtxInfo *)malloc(sizeof(CGLCtxInfo)); |
|
304 |
if (ctxinfo == NULL) { |
|
305 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGC_InitOGLContext: could not allocate memory for ctxinfo"); |
|
306 |
[NSOpenGLContext clearCurrentContext]; |
|
307 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
308 |
return; |
|
309 |
} |
|
310 |
memset(ctxinfo, 0, sizeof(CGLCtxInfo)); |
|
311 |
ctxinfo->context = context; |
|
312 |
ctxinfo->scratchSurface = scratchSurface; |
|
313 |
||
314 |
OGLContext *oglc = (OGLContext *)malloc(sizeof(OGLContext)); |
|
315 |
if (oglc == 0L) { |
|
316 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGC_InitOGLContext: could not allocate memory for oglc"); |
|
317 |
[NSOpenGLContext clearCurrentContext]; |
|
318 |
free(ctxinfo); |
|
319 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
320 |
return; |
|
321 |
} |
|
322 |
memset(oglc, 0, sizeof(OGLContext)); |
|
323 |
oglc->ctxInfo = ctxinfo; |
|
324 |
oglc->caps = caps; |
|
325 |
||
326 |
// create the CGLGraphicsConfigInfo record for this config |
|
327 |
CGLGraphicsConfigInfo *cglinfo = (CGLGraphicsConfigInfo *)malloc(sizeof(CGLGraphicsConfigInfo)); |
|
328 |
if (cglinfo == NULL) { |
|
329 |
J2dRlsTraceLn(J2D_TRACE_ERROR, "CGLGraphicsConfig_getCGLConfigInfo: could not allocate memory for cglinfo"); |
|
330 |
[NSOpenGLContext clearCurrentContext]; |
|
331 |
free(oglc); |
|
332 |
free(ctxinfo); |
|
333 |
[argValue addObject: [NSNumber numberWithLong: 0L]]; |
|
334 |
return; |
|
335 |
} |
|
336 |
memset(cglinfo, 0, sizeof(CGLGraphicsConfigInfo)); |
|
15988 | 337 |
cglinfo->screen = displayID; |
12047 | 338 |
cglinfo->pixfmt = sharedPixelFormat; |
339 |
cglinfo->context = oglc; |
|
340 |
||
341 |
[NSOpenGLContext clearCurrentContext]; |
|
342 |
[argValue addObject: [NSNumber numberWithLong:ptr_to_jlong(cglinfo)]]; |
|
343 |
[pool drain]; |
|
344 |
} |
|
345 |
@end //GraphicsConfigUtil |
|
346 |
||
347 |
JNIEXPORT jint JNICALL |
|
348 |
Java_sun_java2d_opengl_CGLGraphicsConfig_getOGLCapabilities |
|
349 |
(JNIEnv *env, jclass cglgc, jlong configInfo) |
|
350 |
{ |
|
351 |
J2dTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig_getOGLCapabilities"); |
|
352 |
||
353 |
CGLGraphicsConfigInfo *cglinfo = |
|
354 |
(CGLGraphicsConfigInfo *)jlong_to_ptr(configInfo); |
|
355 |
if ((cglinfo == NULL) || (cglinfo->context == NULL)) { |
|
356 |
return CAPS_EMPTY; |
|
357 |
} else { |
|
358 |
return cglinfo->context->caps; |
|
359 |
} |
|
360 |
} |
|
13550
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
361 |
|
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
362 |
JNIEXPORT jint JNICALL |
23325
4c3942938b0d
8027778: [macosx] Full screen not working properly on 7u45 and jdk8
serb
parents:
15988
diff
changeset
|
363 |
Java_sun_java2d_opengl_CGLGraphicsConfig_nativeGetMaxTextureSize |
13550
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
364 |
(JNIEnv *env, jclass cglgc) |
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
365 |
{ |
23325
4c3942938b0d
8027778: [macosx] Full screen not working properly on 7u45 and jdk8
serb
parents:
15988
diff
changeset
|
366 |
J2dTraceLn(J2D_TRACE_INFO, "CGLGraphicsConfig_nativeGetMaxTextureSize"); |
13550
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
367 |
|
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
368 |
__block int max = 0; |
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
369 |
|
23325
4c3942938b0d
8027778: [macosx] Full screen not working properly on 7u45 and jdk8
serb
parents:
15988
diff
changeset
|
370 |
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){ |
13550
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
371 |
[sharedContext makeCurrentContext]; |
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
372 |
j2d_glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max); |
23325
4c3942938b0d
8027778: [macosx] Full screen not working properly on 7u45 and jdk8
serb
parents:
15988
diff
changeset
|
373 |
[NSOpenGLContext clearCurrentContext]; |
13550
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
374 |
}]; |
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
375 |
|
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
376 |
return (jint)max; |
648dd6fa0dee
7160609: [macosx] JDK crash in libjvm.dylib ( C [GeForceGLDriver+0x675a] gldAttachDrawable+0x941)
anthony
parents:
13002
diff
changeset
|
377 |
} |