+ if(preMultiplyOnLoad == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD)
+ {
+ // Change preMultiplyOnLoad value so make caller determine to preMultiplyAlpha or not.
+ // TODO : Should we seperate input and output value?
+ preMultiplyOnLoad = externalTextureInfo.preMultiplied ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+ }
+
+ TextureId alphaMaskId = INVALID_TEXTURE_ID;
+ if(maskInfo && maskInfo->mAlphaMaskUrl.IsValid())
+ {
+ maskInfo->mAlphaMaskId = RequestMaskLoad(maskInfo->mAlphaMaskUrl, StorageType::KEEP_TEXTURE, synchronousLoading);
+ alphaMaskId = maskInfo->mAlphaMaskId;
+
+ // Create new textureId. this textureId is not same as location
+ textureId = RequestLoad(url, alphaMaskId, textureId, 1.0f, desiredSize, fittingMode, samplingMode, UseAtlas::NO_ATLAS, false, textureObserver, orientationCorrection, reloadPolicy, preMultiplyOnLoad, synchronousLoading);
+
+ TextureManager::LoadState loadState = mTextureCacheManager.GetTextureStateInternal(textureId);
+ if(loadState == TextureManager::LoadState::UPLOADED)
+ {
+ textureSet = GetTextureSet(textureId);
+ }
+ }
+ else
+ {
+ // TextureId is same as location
+ textureId = id;
+
+ textureSet = TextureSet::New();
+ textureSet.SetTexture(TEXTURE_INDEX, externalTextureInfo.textureSet.GetTexture(TEXTURE_INDEX));
+ }