Merge branch 'devel/master' into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / texture-manager-impl.cpp
index 64a1977..9a06862 100644 (file)
@@ -771,10 +771,6 @@ void TextureManager::AsyncLoadComplete( AsyncLoadingInfoContainerType& loadingCo
 
         if( textureInfo.loadState != CANCELLED )
         {
-          if( textureInfo.maskApplied )
-          {
-            textureInfo.loadState = MASK_APPLIED;
-          }
           // textureInfo can be invalidated after this call (as the mTextureInfoContainer may be modified)
           PostLoad( textureInfo, pixelBuffer );
         }
@@ -804,8 +800,9 @@ void TextureManager::PostLoad( TextureInfo& textureInfo, Devel::PixelBuffer& pix
       // wait for the mask to finish loading.
       if( textureInfo.maskTextureId != INVALID_TEXTURE_ID )
       {
-        if( textureInfo.loadState == MASK_APPLIED )
+        if( textureInfo.loadState == MASK_APPLYING )
         {
+          textureInfo.loadState = MASK_APPLIED;
           UploadTexture( pixelBuffer, textureInfo );
           NotifyObservers( textureInfo, true );
         }
@@ -890,7 +887,6 @@ void TextureManager::ApplyMask( TextureInfo& textureInfo, TextureId maskTextureI
                    textureInfo.url.GetUrl().c_str(), textureInfo.loadSynchronously?"T":"F" );
 
     textureInfo.loadState = MASK_APPLYING;
-    textureInfo.maskApplied = true;
     auto& loadersContainer = textureInfo.url.IsLocalResource() ? mAsyncLocalLoaders : mAsyncRemoteLoaders;
     auto loadingHelperIt = loadersContainer.GetNext();
     DALI_ASSERT_ALWAYS(loadingHelperIt != loadersContainer.End());