public DynamicAtlasPage(RenderTextureFormat format, FilterMode filterMode, Vector2Int minSize, Vector2Int maxSize)
        {
            textureId       = TextureRegistry.instance.AllocAndAcquireDynamic();
            this.format     = format;
            this.filterMode = filterMode;
            this.minSize    = minSize;
            this.maxSize    = maxSize;

            m_Allocator = new Allocator2D(minSize, maxSize, m_2Padding);
            m_Blitter   = new TextureBlitter(64);
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (atlas != null)
                {
                    UIRUtility.Destroy(atlas);
                    atlas = null;
                }

                if (m_Allocator != null)
                {
                    // m_Allocator.Dispose(); TODO once we pool content
                    m_Allocator = null;
                }

                if (m_Blitter != null)
                {
                    m_Blitter.Dispose();
                    m_Blitter = null;
                }

                if (textureId != TextureId.invalid)
                {
                    TextureRegistry.instance.Release(textureId);
                    textureId = TextureId.invalid;
                }
            }
            else
            {
                UnityEngine.UIElements.DisposeHelper.NotifyMissingDispose(this);
            }

            disposed = true;
        }