@Override public void release() { parent.release(); }
@Override public ImageLayer setImage(Image img) { assert img == null || img instanceof AbstractImageGL<?>; // avoid releasing and rereferencing image if nothing changes if (this.img != img) { if (this.img != null) this.img.release(); this.img = (AbstractImageGL<?>) img; if (this.img != null) this.img.reference(); } return this; }