/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{releaseMaybe as e}from"../../../core/maybe.js";class t{constructor(e,t,h){this._fbos=e,this._format=t,this._name=h}get valid(){return null!=this._handle?.getTexture()}dispose(){this._handle=e(this._handle)}get texture(){return this._handle?.getTexture()}ensureFramebuffer(e,t){this._handle&&this._handle.fbo?.width===e&&this._handle.fbo?.height===t||(this._handle?.release(),this._handle=this._fbos.acquire(e,t,this._name,this._format))}bind(e){e.bindFramebuffer(this._handle?.fbo)}generateMipMap(){this._handle?.getTexture()?.descriptor?.hasMipmap&&this._handle?.getTexture()?.generateMipmap()}}export{t as OverlayFramebufferObject};
