- const TextureHash textureHash = GenerateHash( url.GetUrl(), desiredSize, fittingMode, samplingMode, useAtlas,
- maskTextureId, storageType, isAnimatedImage, frameIndex );
+
+ TextureHash textureHash = INITIAL_CACHE_NUMBER;
+ int cacheIndex = INVALID_CACHE_INDEX;
+ if(storageType != StorageType::RETURN_PIXEL_BUFFER)
+ {
+ textureHash = GenerateHash(url.GetUrl(), desiredSize, fittingMode, samplingMode, useAtlas, maskTextureId, isAnimatedImage, frameIndex);
+
+ // Look up the texture by hash. Note: The extra parameters are used in case of a hash collision.
+ cacheIndex = FindCachedTexture(textureHash, url.GetUrl(), desiredSize, fittingMode, samplingMode, useAtlas, maskTextureId, preMultiplyOnLoad, isAnimatedImage, frameIndex);
+ }