diff options
Diffstat (limited to 'src/nativewindow')
3 files changed, 30 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java index c7d2acec0..48a04a3c9 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java @@ -88,6 +88,12 @@ public class NullWindow implements NativeWindow { return lockedStack; } + public boolean surfaceSwap() { + return false; + } + + public void surfaceUpdated() { } + public long getDisplayHandle() { return displayHandle; } diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java index a4a529c54..5ad2804c1 100644 --- a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java +++ b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java @@ -115,6 +115,12 @@ public abstract class JAWTWindow implements NativeWindow { return lockedStack; } + public boolean surfaceSwap() { + return false; + } + + public void surfaceUpdated() { } + public long getDisplayHandle() { return config.getScreen().getDevice().getHandle(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java index 2a9782c12..6a588538d 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java @@ -111,6 +111,24 @@ public interface NativeWindow { */ public Exception getLockedStack(); + /** + * Provide a mechanism to utilize custom (pre-) swap surface + * code. This method is called before the render toolkit (e.g. JOGL) + * swaps the buffer/surface. The implementation may itself apply the swapping, + * in which case true shall be returned. + * + * @return true if this method completed swapping the surface, + * otherwise false, in which case eg the GLDrawable + * implementation has to swap the code. + */ + public boolean surfaceSwap(); + + /** + * Method invoked after the render toolkit (e.g. JOGL) + * swapped/changed the buffer/surface. + */ + public void surfaceUpdated(); + /** * render all native window information invalid, * as if the native window was destroyed |