- // This is the last remove for this Texture.
- textureInfo.referenceCount = 0;
-
- // If loaded, we can remove the TextureInfo and the Atlas (if atlased).
- if(textureInfo.loadState == LoadState::UPLOADED)
- {
- if(textureInfo.atlas)
- {
- textureInfo.atlas.Remove(textureInfo.atlasRect);
- }
- removeTextureInfo = true;
- }
- else if(textureInfo.loadState == LoadState::LOADING || textureInfo.loadState == LoadState::MASK_APPLYING)
- {
- // We mark the textureInfo for removal.
- // Once the load has completed, this method will be called again.
- textureInfo.loadState = LoadState::CANCELLED;
- }
- else