@Override public final void create(final ProxySurface surface) { final String dbgPrefix; if(DEBUG) { dbgPrefix = getThreadName() + ": EGLUpstreamSurfaceHook.create( up "+upstreamSurface.getClass().getSimpleName()+" -> this "+surface.getClass().getSimpleName()+" ): "; System.err.println(dbgPrefix+this); } else { dbgPrefix = null; } if(upstreamSurface instanceof ProxySurface) { // propagate createNotify(..) so upstreamSurface will be created ((ProxySurface)upstreamSurface).createNotify(); } // lock upstreamSurface, so it can be used in case EGLDisplay is derived from it! if(NativeSurface.LOCK_SURFACE_NOT_READY >= upstreamSurface.lockSurface()) { throw new GLException("Could not lock: "+upstreamSurface); } try { evalUpstreamSurface(dbgPrefix, surface); } finally { upstreamSurface.unlockSurface(); } }
private long getWindowHandle() { if (window_handle_ == 0) { NativeSurface surface = canvas_.getNativeSurface(); if (surface != null) { surface.lockSurface(); window_handle_ = getWindowHandle(surface.getSurfaceHandle()); surface.unlockSurface(); assert (window_handle_ != 0); } } return window_handle_; }
throw new IllegalArgumentException("Contrast must be greater than 0.0"); if( NativeSurface.LOCK_SURFACE_NOT_READY >= surface.lockSurface() ) { return false;
@Override public synchronized final void resetDisplayGamma(final NativeSurface surface) { if( NativeSurface.LOCK_SURFACE_NOT_READY >= surface.lockSurface() ) { return; } try { final AbstractGraphicsScreen screen = surface.getGraphicsConfiguration().getScreen(); final DeviceScreenID deviceScreenID = new DeviceScreenID(screen.getDevice().getConnection(), screen.getIndex()); final Buffer originalGammaRamp = screen2OrigGammaRamp.remove(deviceScreenID); if( null != originalGammaRamp ) { resetGammaRamp(surface, originalGammaRamp); } } finally { surface.unlockSurface(); } }
((ProxySurface)surface).createNotify(); if(NativeSurface.LOCK_SURFACE_NOT_READY >= surface.lockSurface()) { throw new GLException("GLDrawableImpl.setRealized(true): Surface not ready (lockSurface)");
try { final NativeSurface srcSurface = src.getNativeSurface(); final boolean srcSurfaceLocked = NativeSurface.LOCK_SURFACE_NOT_READY < srcSurface.lockSurface(); if( src.isRealized() && !srcSurfaceLocked ) { throw new GLException("Could not lock realized surface "+src);
final int lockRes = surface.lockSurface(); if ( NativeSurface.LOCK_SURFACE_CHANGED == lockRes && realized ) {
final int lockRes = ns.lockSurface(); if ( NativeSurface.LOCK_SURFACE_NOT_READY >= lockRes ) { throw new NativeWindowException("Could not lock surface of drawable: "+drawable);
try { final NativeSurface destSurface = dest.getNativeSurface(); final boolean destSurfaceLocked = NativeSurface.LOCK_SURFACE_NOT_READY < destSurface.lockSurface(); if( dest.isRealized() && !destSurfaceLocked ) { throw new GLException("Could not lock realized surface "+dest);
if(NativeSurface.LOCK_SURFACE_NOT_READY >= ns.lockSurface()) { throw new GLException("Surface not ready (lockSurface)");
final SharedResource sharedResource = ((WindowsWGLDrawableFactory)factory).getOrCreateSharedResourceImpl(config.getScreen().getDevice()); final NativeSurface sharedSurface = sharedResource.getDrawable().getNativeSurface(); if (NativeSurface.LOCK_SURFACE_NOT_READY >= sharedSurface.lockSurface()) { throw new NativeWindowException("Could not lock (sharedSurface): "+this);
try { final NativeSurface aSurface = a.getNativeSurface(); final boolean aSurfaceLocked = NativeSurface.LOCK_SURFACE_NOT_READY < aSurface.lockSurface(); if( a.isRealized() && !aSurfaceLocked ) { throw new GLException("Could not lock realized a surface "+a); final boolean bSurfaceLocked = NativeSurface.LOCK_SURFACE_NOT_READY < bSurface.lockSurface(); if( b.isRealized() && !bSurfaceLocked ) { throw new GLException("Could not lock realized b surface "+b);