jawtWindow.lockSurface();
protected Point getLocationOnScreenNative(final Point storage) { final int lockRes = lockSurface(); if(LOCK_SURFACE_NOT_READY == lockRes) { if(DEBUG) { System.err.println("Warning: JAWT Lock couldn't be acquired: "+this); Thread.dumpStack(); } return null; } try { final Point d = getLocationOnScreenNativeImpl(0, 0); if(null!=d) { if(null!=storage) { storage.translate(d.getX(),d.getY()); return storage; } } return d; } finally { unlockSurface(); } } protected abstract Point getLocationOnScreenNativeImpl(int x, int y);
@Override public void addNotify() { super.addNotify(); nativeWindow = (JAWTWindow)NativeWindowFactory.getNativeWindow(this, awtConfig); nativeWindow.lockSurface(); try { glDrawable = GLDrawableFactory.getFactory(profile).createGLDrawable(nativeWindow); } finally { nativeWindow.unlockSurface(); } glDrawable.setRealized(true); }
private void createJAWTDrawableAndContext() { if ( !Beans.isDesignTime() ) { jawtWindow = (JAWTWindow) NativeWindowFactory.getNativeWindow(this, awtConfig); jawtWindow.setShallUseOffscreenLayer(shallUseOffscreenLayer); jawtWindow.setSurfaceScale(reqPixelScale); jawtWindow.lockSurface(); try { drawable = (GLDrawableImpl) GLDrawableFactory.getFactory(capsReqUser.getGLProfile()).createGLDrawable(jawtWindow); createContextImpl(drawable); jawtWindow.getCurrentSurfaceScale(hasPixelScale); jawtWindow.getNativeSurfaceScale(nativePixelScale); } finally { jawtWindow.unlockSurface(); } } } private boolean createContextImpl(final GLDrawable drawable) {
jawtWindow.lockSurface(); upstreamScale.setHasPixelScale(jawtWindow.getCurrentSurfaceScale(new int[2])); jawtWindow.unlockSurface();
nativeWindow.lockSurface(); try { glDrawable = GLDrawableFactory.getFactory(profile).createGLDrawable(nativeWindow);