Revert "[Tizen] Add log if destroyed visual get some signal"
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image / image-visual.cpp
index c57ac33..9e18e36 100644 (file)
@@ -680,9 +680,9 @@ void ImageVisual::LoadTexture(bool& atlasing, Vector4& atlasRect, TextureSet& te
     else
     {
       DALI_ASSERT_ALWAYS(mFastTrackLoadingTask->mTextures.size() >= 3u);
-      textureSet.SetTexture(0u, mFastTrackLoadingTask->mTextures[0]);
-      textureSet.SetTexture(1u, mFastTrackLoadingTask->mTextures[1]);
       textureSet.SetTexture(2u, mFastTrackLoadingTask->mTextures[2]);
+      textureSet.SetTexture(1u, mFastTrackLoadingTask->mTextures[1]);
+      textureSet.SetTexture(0u, mFastTrackLoadingTask->mTextures[0]);
 
       // We cannot determine what kind of shader will be used.
       // Just use unified shader, and then change shader after load completed.
@@ -1042,18 +1042,8 @@ void ImageVisual::FastLoadComplete(FastTrackLoadingTaskPtr task)
 void ImageVisual::LoadComplete(bool loadingSuccess, TextureInformation textureInformation)
 {
   Toolkit::Visual::ResourceStatus resourceStatus;
-  if(DALI_UNLIKELY(mImpl == nullptr))
-  {
-    DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! ImageVisual : %p, url : %s\n", this, mImageUrl.GetUrl().c_str());
-    return;
-  }
   if(mImpl->mRenderer)
   {
-    if(textureInformation.useAtlasing)
-    {
-      mImpl->mRenderer.RegisterProperty(ATLAS_RECT_UNIFORM_NAME, mAtlasRect);
-    }
-
     EnablePreMultipliedAlpha(textureInformation.preMultiplied);
 
     Actor actor = mPlacementActor.GetHandle();
@@ -1064,12 +1054,9 @@ void ImageVisual::LoadComplete(bool loadingSuccess, TextureInformation textureIn
     }
     else
     {
-      if(!textureInformation.useAtlasing)
-      {
-        Sampler sampler = Sampler::New();
-        sampler.SetWrapMode(mWrapModeU, mWrapModeV);
-        textureInformation.textureSet.SetSampler(0u, sampler);
-      }
+      Sampler sampler = Sampler::New();
+      sampler.SetWrapMode(mWrapModeU, mWrapModeV);
+      textureInformation.textureSet.SetSampler(0u, sampler);
 
       mImpl->mRenderer.SetTextures(textureInformation.textureSet);
       ComputeTextureSize();
@@ -1336,6 +1323,10 @@ void ImageVisual::CheckMaskTexture()
       {
         mImpl->mRenderer.RegisterProperty(MASK_TEXTURE_RATIO_NAME, ComputeMaskTextureRatio());
       }
+      else
+      {
+        mImpl->mRenderer.RegisterProperty(MASK_TEXTURE_RATIO_NAME, Vector2::ONE);
+      }
       maskLoadFailed = false;
     }