/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../core/ObjectPool","../../../webgl/enums","../../../webgl/FramebufferObject"],(function(e,t,o,r,i){"use strict";let l=function(){function e(e){this._rctx=e,this._pools=new Map}var t=e.prototype;return t.acquire=function(e){return this._getPool(e).acquire()},t.clear=function(){this._pools.forEach((e=>e.destroy())),this._pools.clear()},t._getPool=function(e){let t=this._pools.get(e);if(!t){const i=n.bind(n,this._rctx,{colorTarget:r.TargetType.TEXTURE,depthStencilTarget:r.DepthStencilTargetType.DEPTH_RENDER_BUFFER,width:e,height:e},(e=>this._getPool(e.width).release(e)));t=new o(i,null,(()=>{})),this._pools.set(e,t)}return t},e}(),n=function(e){function o(o,r,i){var l;return(l=e.call(this,o,r)||this).release=()=>i(t._assertThisInitialized(l)),l}return t._inheritsLoose(o,e),o}(i.FramebufferObject);e.FBOPool=l,e.PooledFramebufferObject=n,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
