Revert "[Tizen] Add AlphaMask to synchronousLoading"
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:41:39 +0000 (17:41 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Fri, 27 Dec 2019 08:41:39 +0000 (17:41 +0900)
This reverts commit 0f64d3e70ed8ab250e9eebdf3d1dded5eea5493d.

dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/texture-manager-impl.cpp

index e339995..8607fa8 100644 (file)
@@ -427,6 +427,8 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
         AllocateMaskData();
         // Immediately trigger the alpha mask loading (it may just get a cached value)
         mMaskingData->mAlphaMaskUrl = alphaUrl;
+        TextureManager& textureManager = mFactoryCache.GetTextureManager();
+        mMaskingData->mAlphaMaskId = textureManager.RequestMaskLoad( alphaUrl );
       }
       break;
     }
index 57384b3..6dcc2fc 100644 (file)
@@ -182,15 +182,6 @@ TextureSet TextureManager::LoadTexture(
     {
       Devel::PixelBuffer pixelBuffer = LoadImageFromFile( url.GetUrl(), desiredSize, fittingMode, samplingMode,
                                        orientationCorrection  );
-      if( maskInfo )
-      {
-        Devel::PixelBuffer maskPixelBuffer = LoadImageFromFile( maskInfo->mAlphaMaskUrl.GetUrl(), ImageDimensions(),
-                                             FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER, true  );
-        if( maskPixelBuffer )
-        {
-          pixelBuffer.ApplyMask( maskPixelBuffer, maskInfo->mContentScaleFactor, maskInfo->mCropToMask );
-        }
-      }
       if( pixelBuffer )
       {
         PreMultiply( pixelBuffer, preMultiplyOnLoad );
@@ -252,9 +243,8 @@ TextureSet TextureManager::LoadTexture(
       }
       else
       {
-        TextureId alphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
         textureId = RequestLoad( url,
-                                 alphaMaskId,
+                                 maskInfo->mAlphaMaskId,
                                  maskInfo->mContentScaleFactor,
                                  desiredSize,
                                  fittingMode, samplingMode,