minor tweak to the order in which CALayer support is detected.

This commit is contained in:
kappa1 2011-10-11 22:39:32 +00:00
parent c5eadd89a0
commit b09c6cf335
2 changed files with 4 additions and 4 deletions

View File

@ -80,8 +80,8 @@ final class AWTSurfaceLock {
// It is only needed on first call, so we avoid it on all subsequent calls
// due to performance..
// Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
// Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas;
if (firstLockSucceeded)
return lockAndInitHandle(lock_buffer, component, allowCALayer);

View File

@ -50,8 +50,8 @@ abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo {
}
protected void initHandle(Canvas component) throws LWJGLException {
// Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
// Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas;
nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer);
}