JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
DelegatedUpstreamSurfaceHookMutableSize.java
Go to the documentation of this file.
1package com.jogamp.nativewindow;
2
3import com.jogamp.nativewindow.ProxySurface;
4import com.jogamp.nativewindow.UpstreamSurfaceHook;
5
7 final UpstreamSurfaceHook upstream;
8
9 /**
10 * @param upstream optional upstream UpstreamSurfaceHook used for {@link #create(ProxySurface)} and {@link #destroy(ProxySurface)}.
11 * @param width initial width
12 * @param height initial height
13 */
14 public DelegatedUpstreamSurfaceHookMutableSize(final UpstreamSurfaceHook upstream, final int width, final int height) {
15 super(width, height);
16 this.upstream = upstream;
17 }
18
19 @Override
20 public final void create(final ProxySurface s) {
21 if(null != upstream) {
22 upstream.create(s);
23 }
24 }
25
26 @Override
27 public final void destroy(final ProxySurface s) {
28 if(null != upstream) {
29 upstream.destroy(s);
30 }
31 }
32
33 @Override
34 public String toString() {
35 return getClass().getSimpleName()+"[ "+ pixWidth + "x" + pixHeight + ", " + upstream + "]";
36 }
37
38}
39
final void destroy(final ProxySurface s)
called within ProxySurface#destroyNotify() within lock, before clearing fields.
DelegatedUpstreamSurfaceHookMutableSize(final UpstreamSurfaceHook upstream, final int width, final int height)
final void create(final ProxySurface s)
called within ProxySurface#createNotify() within lock, before using surface.
Provides a mutable NativeSurface, i.e.
Interface allowing upstream caller to pass lifecycle actions and size info to a ProxySurface instance...
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.