| Modifier and Type | Field and Description |
|---|---|
| private AbstractGraphicsConfiguration | |
| private int | |
| private long | |
| private final RecursiveLock | |
| private final SurfaceUpdatedHelper | |
| private UpstreamSurfaceHook | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| protected | ProxySurfaceImpl(final AbstractGraphicsConfiguration
the cfg, final UpstreamSurfaceHook AbstractGraphicsConfiguration to be usedthe upstream, final boolean UpstreamSurfaceHook to be usedtrue if this ProxySurface instance
owns the AbstractGraphicsConfiguration's AbstractGraphicsDevice,
otherwise false. Owning the device implies closing it at destroyNotify().
|
| Modifier and Type | Method and Description |
|---|---|
| public void | addSurfaceUpdatedListener(final SurfaceUpdatedListener l)
Implements com. SurfaceUpdatedListener to the end of the list.
|
| public void | addSurfaceUpdatedListener(final int
Position where the listener will be inserted.
Should be within (0 <= index && index <= size()).
An index value of -1 is interpreted as the end of the list, size(). index, final SurfaceUpdatedListener The listener object to be inserted l)Implements com. SurfaceUpdatedListener at the
specified position in the list.
|
| public final void | addUpstreamOptionBits(final int v)
Implements com. v.
|
| public final void | clearUpstreamOptionBits(final int v)
Implements com. ~v
|
| public final boolean | containsUpstreamOptionBits(final int v)
Implements com. true if the give bit-mask v is set in this instance upstream-option-bits, otherwise false.
|
| public void | createNotify()
Implements com. UpstreamSurfaceHook#create(ProxySurface) is being issued and the proxy surface/window handles shall be set.
|
| public void | destroyNotify()
Implements com. UpstreamSurfaceHook#destroy(ProxySurface) is being issued and all proxy surface/window handles shall be cleared.
|
| public static void | |
| private static void | |
| public final void | enableUpstreamSurfaceHookLifecycle(final boolean enable)
Implements com. UpstreamSurfaceHook lifecycle functions
UpstreamSurfaceHook#create(ProxySurface) and UpstreamSurfaceHook#destroy(ProxySurface).
|
| public final long | getDisplayHandle()
Implements com. |
| public final AbstractGraphicsConfiguration | getGraphicsConfiguration()
Implements com. |
| public final int | getScreenIndex()
Implements com. |
| public abstract long | getSurfaceHandle()
Redeclares com. |
| public final int | getSurfaceHeight()
Implements com. |
| public final Thread | getSurfaceLockOwner()
Implements com. |
| public final int | getSurfaceWidth()
Implements com. |
| public final StringBuilder | |
| public final int | |
| public final NativeSurface | getUpstreamSurface()
Implements com. NativeSurface if used by implementation, otherwise null.
|
| public final UpstreamSurfaceHook | getUpstreamSurfaceHook()
Implements com. UpstreamSurfaceHook if set, otherwise null.
|
| protected void | invalidateImpl()
Must be overridden by implementations allowing having a |
| public final boolean | isSurfaceLockedByOtherThread()
Implements com. |
| public int | lockSurface()
Implements com. |
| protected abstract int | |
| public void | removeSurfaceUpdatedListener(final SurfaceUpdatedListener l)
Implements com. SurfaceUpdatedListener from the list.
|
| public final void | setGraphicsConfiguration(final AbstractGraphicsConfiguration cfg)
Implements com. |
| public abstract void | setSurfaceHandle(long surfaceHandle)
Redeclares com. |
| public void | setUpstreamSurfaceHook(final UpstreamSurfaceHook hook)
Implements com. UpstreamSurfaceHook.
|
| public boolean | surfaceSwap()
Implements com. |
| public void | surfaceUpdated(final Object
is the caller object who updated the surface,
e.g. a JOGL GLDrawable. updater, final NativeSurface the updated NativeSurface ns, final long the time in ms, when the surface was updated when)Implements com. |
| public StringBuilder | |
| public String | toString()
Overrides java. Implements com. |
| public final void | unlockSurface()
Implements com. lockSurface()
The implementation shall also invoke |
| protected abstract void | |
| public final void |
| config | back to summary |
|---|---|
| private AbstractGraphicsConfiguration config | |
| implBitfield | back to summary |
|---|---|
| private int implBitfield | |
| surfaceHandle_old | back to summary |
|---|---|
| private long surfaceHandle_old | |
| surfaceLock | back to summary |
|---|---|
| private final RecursiveLock surfaceLock | |
| surfaceUpdatedHelper | back to summary |
|---|---|
| private final SurfaceUpdatedHelper surfaceUpdatedHelper | |
| upstream | back to summary |
|---|---|
| private UpstreamSurfaceHook upstream | |
| upstreamSurfaceHookLifecycleEnabled | back to summary |
|---|---|
| private boolean upstreamSurfaceHookLifecycleEnabled | |
| ProxySurfaceImpl | back to summary |
|---|---|
protected ProxySurfaceImpl(final AbstractGraphicsConfiguration cfg, final UpstreamSurfaceHook upstream, final boolean ownsDevice)
| |
| addSurfaceUpdatedListener | back to summary |
|---|---|
| public void addSurfaceUpdatedListener(final SurfaceUpdatedListener l) Implements com. Doc from com. Appends the given
| |
| addSurfaceUpdatedListener | back to summary |
|---|---|
| public void addSurfaceUpdatedListener(final int index, final SurfaceUpdatedListener l) throws IndexOutOfBoundsException Implements com. Doc from com. Inserts the given
| |
| addUpstreamOptionBits | back to summary |
|---|---|
| public final void addUpstreamOptionBits(final int v) Implements com. Doc from com. Add the given bit-mask to this instance upstream-option-bits using bit-or w/
| |
| clearUpstreamOptionBits | back to summary |
|---|---|
| public final void clearUpstreamOptionBits(final int v) Implements com. Doc from com. Clear the given bit-mask from this instance upstream-option-bits using bit-and w/
| |
| containsUpstreamOptionBits | back to summary |
|---|---|
| public final boolean containsUpstreamOptionBits(final int v) Implements com. Doc from com. Returns
| |
| createNotify | back to summary |
|---|---|
| public void createNotify() Implements com. Doc from com.
| |
| destroyNotify | back to summary |
|---|---|
| public void destroyNotify() Implements com. Doc from com.
| |
| dumpHierarchy | back to summary |
|---|---|
| public static void dumpHierarchy(final PrintStream out, final ProxySurface s) | |
| dumpHierarchy | back to summary |
|---|---|
| private static void dumpHierarchy(final PrintStream out, final NativeSurface s, String indentation) | |
| enableUpstreamSurfaceHookLifecycle | back to summary |
|---|---|
| public final void enableUpstreamSurfaceHookLifecycle(final boolean enable) Implements com. Doc from com. Enables or disables the Use this for small code blocks where the native resources shall not change, i.e. resizing a derived (OpenGL) drawable.
| |
| getDisplayHandle | back to summary |
|---|---|
| public final long getDisplayHandle() Implements com. Doc from com. Convenience: Get display handle from AbstractGraphicsConfiguration . AbstractGraphicsScreen . AbstractGraphicsDevice
| |
| getGraphicsConfiguration | back to summary |
|---|---|
| public final AbstractGraphicsConfiguration getGraphicsConfiguration() Implements com. Doc from com. Returns the graphics configuration corresponding to this window.
In case the implementation utilizes a delegation pattern to wrap abstract toolkits,
this method shall return the native
| |
| getScreenIndex | back to summary |
|---|---|
| public final int getScreenIndex() Implements com. Doc from com. Convenience: Get display handle from AbstractGraphicsConfiguration . AbstractGraphicsScreen
| |
| getSurfaceHandle | back to summary |
|---|---|
| public abstract long getSurfaceHandle() Redeclares com. Doc from com. Returns the handle to the surface for this NativeSurface.
The surface handle should be set/update by
On X11 this returns an entity of type Window,
since there is no differentiation of surface and window there.
| |
| getSurfaceHeight | back to summary |
|---|---|
| public final int getSurfaceHeight() Implements com. Doc from com. Returns the height of the client area excluding insets (window decorations) in pixel units.
| |
| getSurfaceLockOwner | back to summary |
|---|---|
| public final Thread getSurfaceLockOwner() Implements com. Doc from com. Return the locking owner's Thread, or null if not locked.
| |
| getSurfaceWidth | back to summary |
|---|---|
| public final int getSurfaceWidth() Implements com. Doc from com. Returns the width of the client area excluding insets (window decorations) in pixel units.
| |
| getUpstreamOptionBits | back to summary |
|---|---|
| public final StringBuilder getUpstreamOptionBits(StringBuilder sink) Implements com.
| |
| getUpstreamOptionBits | back to summary |
|---|---|
| public final int getUpstreamOptionBits() Implements com.
| |
| getUpstreamSurface | back to summary |
|---|---|
| public final NativeSurface getUpstreamSurface() Implements com. Doc from com. Returns the optional upstream
The upstream One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).
| |
| getUpstreamSurfaceHook | back to summary |
|---|---|
| public final UpstreamSurfaceHook getUpstreamSurfaceHook() Implements com. Doc from com. Returns the
| |
| invalidateImpl | back to summary |
|---|---|
| protected void invalidateImpl() Must be overridden by implementations allowing having a
| |
| isSurfaceLockedByOtherThread | back to summary |
|---|---|
| public final boolean isSurfaceLockedByOtherThread() Implements com. Doc from com. Query if surface is locked by another thread, i.e. not the current one.
final Thread o = getSurfaceLockOwner();
if( null != o && Thread.currentThread() != o ) { .. }
| |
| lockSurface | back to summary |
|---|---|
| public int lockSurface() throws NativeWindowException, RuntimeException Implements com. Doc from com. Lock the surface of this native window.
The surface handle shall be valid after a successfull call,
ie return a value other than boolean ok = LOCK_SURFACE_NOT_READY < lockSurface();
The caller may need to take care of the result This call is blocking until the surface has been locked or a timeout is reached. The latter will throw a runtime exception. This call allows recursion from the same thread.
The implementation may want to aquire the
application level
The implementation shall also invoke
| |
| lockSurfaceImpl | back to summary |
|---|---|
| protected abstract int lockSurfaceImpl() | |
| removeSurfaceUpdatedListener | back to summary |
|---|---|
| public void removeSurfaceUpdatedListener(final SurfaceUpdatedListener l) Implements com. Doc from com. Remove the specified
| |
| setGraphicsConfiguration | back to summary |
|---|---|
| public final void setGraphicsConfiguration(final AbstractGraphicsConfiguration cfg) Implements com. Doc from com. Allow redefining the AbstractGraphicsConfiguration
| |
| setSurfaceHandle | back to summary |
|---|---|
| public abstract void setSurfaceHandle(long surfaceHandle) Redeclares com. Doc from com. Sets the surface handle which is created outside of this implementation.
| |
| setUpstreamSurfaceHook | back to summary |
|---|---|
| public void setUpstreamSurfaceHook(final UpstreamSurfaceHook hook) Implements com. Doc from com. Overrides the
| |
| surfaceSwap | back to summary |
|---|---|
| public boolean surfaceSwap() Implements com. Doc from com. 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 if double buffering is enabled. The implementation may itself apply the swapping, in which case true shall be returned.
| |
| surfaceUpdated | back to summary |
|---|---|
| public void surfaceUpdated(final Object updater, final NativeSurface ns, final long when) Implements com. Doc from com. Notification of a surface update event, eg. after a swap buffer operation.
| |
| toString | back to summary |
|---|---|
| public StringBuilder toString(StringBuilder sink) Implements com.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements com. Doc from java. Returns a string representation of the object. | |
| unlockSurface | back to summary |
|---|---|
| public final void unlockSurface() Implements com. Doc from com. Unlock the surface of this native window
Shall not modify the surface handle, see
The implementation shall also invoke The implementation shall be fail safe, i.e. tolerant in case the native resources are already released / unlocked. In this case the implementation shall simply ignore the call.
| |
| unlockSurfaceImpl | back to summary |
|---|---|
| protected abstract void unlockSurfaceImpl() | |
| validateSurfaceLocked | back to summary |
|---|---|
| public final void validateSurfaceLocked() | |