summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/sun/javafx
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com/sun/javafx')
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/Window.java6
-rw-r--r--src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java13
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java13
3 files changed, 30 insertions, 2 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/Window.java b/src/newt/classes/com/sun/javafx/newt/Window.java
index a1168d12d..e2903bd62 100755
--- a/src/newt/classes/com/sun/javafx/newt/Window.java
+++ b/src/newt/classes/com/sun/javafx/newt/Window.java
@@ -269,6 +269,12 @@ public abstract class Window implements NativeWindow
y=0;
}
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ public void surfaceUpdated() {}
+
protected void clearEventMask() {
eventMask=0;
}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
index 8ecfe6216..7a7ff0859 100644
--- a/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/GLWindow.java
@@ -654,6 +654,19 @@ public class GLWindow extends Window implements GLAutoDrawable {
return null;
}
+ public boolean surfaceSwap() {
+ if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
+ return super.surfaceSwap();
+ }
+
+ public void surfaceUpdated() {
+ if(null!=drawable) {
+ drawable.getNativeWindow().surfaceUpdated();
+ } else {
+ super.surfaceUpdated();
+ }
+ }
+
public long getWindowHandle() {
if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
return super.getWindowHandle();
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
index 10e70baa0..ddee07c49 100755
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java
@@ -85,10 +85,10 @@ public class BCEGLWindow extends Window {
void setSizeImpl(int width, int height) {
if(0!=windowHandle) {
// n/a in BroadcomEGL
- System.err.println("setSize n/a in BroadcomEGL with realized window");
+ System.err.println("BCEGLWindow.setSizeImpl n/a in BroadcomEGL with realized window");
} else {
if(DEBUG_IMPLEMENTATION) {
- Exception e = new Exception("BCEGLWindow.setSize() "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ Exception e = new Exception("BCEGLWindow.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
e.printStackTrace();
}
this.width = width;
@@ -107,6 +107,14 @@ public class BCEGLWindow extends Window {
return false;
}
+ public boolean surfaceSwap() {
+ if ( 0!=windowHandle ) {
+ SwapWindow(getDisplayHandle(), windowHandle);
+ return true;
+ }
+ return false;
+ }
+
//----------------------------------------------------------------------
// Internals only
//
@@ -114,6 +122,7 @@ public class BCEGLWindow extends Window {
protected static native boolean initIDs();
private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
+ private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
private long realizeWindow(boolean chromaKey, int width, int height) {