public class DelegatedUpstreamSurfaceHookWithSurfaceSize extends Object implements UpstreamSurfaceHook
UpstreamSurfaceHook.MutableSize| Constructor and Description |
|---|
DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream,
NativeSurface surface) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(ProxySurface s)
called within
ProxySurface.createNotify() within lock, before using surface. |
void |
destroy(ProxySurface s)
called within
ProxySurface.destroyNotify() within lock, before clearing fields. |
int |
getSurfaceHeight(ProxySurface s)
Returns the height of the upstream surface in pixels, used if
ProxySurface#UPSTREAM_PROVIDES_SIZE is set. |
int |
getSurfaceWidth(ProxySurface s)
Returns the width of the upstream surface in pixels, used if
ProxySurface#UPSTREAM_PROVIDES_SIZE is set. |
NativeSurface |
getUpstreamSurface()
Returns the optional upstream
NativeSurface if used by implementation, otherwise null. |
String |
toString() |
public DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream, NativeSurface surface)
upstream - optional upstream UpstreamSurfaceHook used for create(ProxySurface) and destroy(ProxySurface).surface - mandatory NativeSurface used for getSurfaceWidth(ProxySurface) and getSurfaceHeight(ProxySurface), not used for getUpstreamSurface().public final NativeSurface getUpstreamSurface()
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 null.
getUpstreamSurface in interface UpstreamSurfaceHookpublic final void create(ProxySurface s)
UpstreamSurfaceHookProxySurface.createNotify() within lock, before using surface.create in interface UpstreamSurfaceHookpublic final void destroy(ProxySurface s)
UpstreamSurfaceHookProxySurface.destroyNotify() within lock, before clearing fields.destroy in interface UpstreamSurfaceHookpublic final int getSurfaceWidth(ProxySurface s)
UpstreamSurfaceHookProxySurface#UPSTREAM_PROVIDES_SIZE is set.getSurfaceWidth in interface UpstreamSurfaceHookpublic final int getSurfaceHeight(ProxySurface s)
UpstreamSurfaceHookProxySurface#UPSTREAM_PROVIDES_SIZE is set.getSurfaceHeight in interface UpstreamSurfaceHookCopyright 2010 JogAmp Community.