Top Description Fields Constructors Methods
jogamp.opengl.egl

public Class EGLUpstreamSurfaceHook

extends Object
implements MutableSize
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.UpstreamSurfaceHook.MutableSize, com.jogamp.nativewindow.UpstreamSurfaceHook
Imports
com.jogamp.nativewindow.AbstractGraphicsConfiguration, .AbstractGraphicsDevice, .AbstractGraphicsScreen, .DefaultGraphicsScreen, .NativeSurface, .ProxySurface, .UpstreamSurfaceHook, .VisualIDHolder.VIDType, com.jogamp.opengl.GLCapabilitiesImmutable, .GLException, jogamp.nativewindow.WrappedSurface, com.jogamp.nativewindow.egl.EGLGraphicsDevice, com.jogamp.opengl.egl.EGL

EGLSurface [ is_a -> WrappedSurface -> ProxySurfaceImpl -> ProxySurface -> MutableSurface -> NativeSurface] has_a
    EGLUpstreamSurfaceHook [ is_a -> UpstreamSurfaceHook.MutableSize -> UpstreamSurfaceHook ] has_a
       NativeSurface (e.g. native [X11, WGL, ..] surface, or WrappedSurface, ..)

Field Summary

Modifier and TypeField and Description
private static final boolean
private final NativeSurface
private final UpstreamSurfaceHook.MutableSize

Constructor Summary

AccessConstructor and Description
public
public
EGLUpstreamSurfaceHook(final EGLGraphicsConfiguration cfg, final long handle, final UpstreamSurfaceHook upstream, final boolean ownsDevice)

Method Summary

Modifier and TypeMethod and Description
public final void
create(final ProxySurface surface)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.create.

called within ProxySurface#createNotify() within lock, before using surface.
public final void
destroy(final ProxySurface surface)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

called within ProxySurface#destroyNotify() within lock, before clearing fields.
private final void
evalUpstreamSurface(final String dbgPrefix, final ProxySurface surface)

public final int
getSurfaceHeight(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
public final int
getSurfaceWidth(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.
pack-priv static String
public final NativeSurface
getUpstreamSurface()

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Returns the optional upstream NativeSurface if used by implementation, otherwise null.
public final void
setSurfaceSize(final int
new width in pixel units
width
,
final int
new height in pixel units
height
)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.MutableSize.setSurfaceSize.

Resizes the upstream surface.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG
upstreamSurfaceback to summary
private final NativeSurface upstreamSurface
upstreamSurfaceHookMutableSizeback to summary
private final UpstreamSurfaceHook.MutableSize upstreamSurfaceHookMutableSize

Constructor Detail

EGLUpstreamSurfaceHookback to summary
public EGLUpstreamSurfaceHook(final NativeSurface upstream)
EGLUpstreamSurfaceHookback to summary
public EGLUpstreamSurfaceHook(final EGLGraphicsConfiguration cfg, final long handle, final UpstreamSurfaceHook upstream, final boolean ownsDevice)

Method Detail

createback to summary
public final void create(final ProxySurface surface)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.create.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.create.

called within ProxySurface#createNotify() within lock, before using surface.

Annotations
@Override
destroyback to summary
public final void destroy(final ProxySurface surface)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.destroy.

called within ProxySurface#destroyNotify() within lock, before clearing fields.

Annotations
@Override
evalUpstreamSurfaceback to summary
private final void evalUpstreamSurface(final String dbgPrefix, final ProxySurface surface)
getSurfaceHeightback to summary
public final int getSurfaceHeight(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceHeight.

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Annotations
@Override
getSurfaceWidthback to summary
public final int getSurfaceWidth(final ProxySurface s)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getSurfaceWidth.

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

Annotations
@Override
getThreadNameback to summary
pack-priv static String getThreadName()
getUpstreamSurfaceback to summary
public final NativeSurface getUpstreamSurface()

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.getUpstreamSurface.

Returns the optional upstream NativeSurface if used by implementation, otherwise null.

One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).

Returns the actual upstream NativeSurface, e.g. native X11 surface.

Annotations
@Override
setSurfaceSizeback to summary
public final void setSurfaceSize(final int width, final int height)

Implements com.jogamp.nativewindow.UpstreamSurfaceHook.MutableSize.setSurfaceSize.

Doc from com.jogamp.nativewindow.UpstreamSurfaceHook.MutableSize.setSurfaceSize.

Resizes the upstream surface.

Parameters
width:int

new width in pixel units

height:int

new height in pixel units

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override