- else
- {
- loadingStatus = true;
- if( atlasingStatus )
- {
- textureSet = imageAtlasManager->Add( textureRect, url.GetUrl(), desiredSize, fittingMode, true, atlasObserver);
- }
- if( !textureSet ) // big image, no atlasing or atlasing failed
- {
- atlasingStatus = false;
- if( !maskInfo || !maskInfo->mAlphaMaskUrl.IsValid() )
- {
- textureId = RequestLoad( url, desiredSize, fittingMode, samplingMode, TextureManager::NO_ATLAS,
- textureObserver, orientationCorrection, reloadPolicy, preMultiplyOnLoad );
- }
- else
- {
- maskInfo->mAlphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
- textureId = RequestLoad( url,
- maskInfo->mAlphaMaskId,
- maskInfo->mContentScaleFactor,
- desiredSize,
- fittingMode, samplingMode,
- TextureManager::NO_ATLAS,
- maskInfo->mCropToMask,
- textureObserver,
- orientationCorrection,
- reloadPolicy, preMultiplyOnLoad );
- }
-
- TextureManager::LoadState loadState = GetTextureStateInternal( textureId );
- if( loadState == TextureManager::UPLOADED )
- {
- // UploadComplete has already been called - keep the same texture set
- textureSet = GetTextureSet( textureId );
- }
-
- // If we are loading the texture, or waiting for the ready signal handler to complete, inform
- // caller that they need to wait.
- loadingStatus = ( loadState == TextureManager::LOADING ||
- loadState == TextureManager::WAITING_FOR_MASK ||
- loadState == TextureManager::MASK_APPLYING ||
- loadState == TextureManager::MASK_APPLIED ||
- loadState == TextureManager::NOT_STARTED ||
- mQueueLoadFlag );