/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{TextureBuffer as e}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{BufferCache as t}from"./BufferCache.js";class r{constructor(r,f){this._layout=f,this._cache=new t(r.newCache,t=>new e(r,f,Math.floor(t/this._layout.byteStride)),"TextureBufferCache")}dispose(){this._cache.dispose()}newTextureBuffer(e){return this._cache.newBuffer(e*this._layout.byteStride)}deleteTextureBuffer(e){return this._cache.deleteBuffer(e)}}export{r as TextureBufferCache};
