[Tizen]Unload AlphaMask when application set empty path 63/222263/3
authorSunghyun kim <scholb.kim@samsung.com>
Mon, 13 Jan 2020 05:41:25 +0000 (14:41 +0900)
committerSunghyun kim <scholb.kim@samsung.com>
Mon, 13 Jan 2020 06:53:35 +0000 (15:53 +0900)
If an application sets an empty path to the alpha mask, unload the alpha mask.

Change-Id: Ieeaaddd0e999e08778ff84c35e1c601dbdd8b038

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

index 57384b3..4512a08 100644 (file)
@@ -182,7 +182,7 @@ TextureSet TextureManager::LoadTexture(
     {
       Devel::PixelBuffer pixelBuffer = LoadImageFromFile( url.GetUrl(), desiredSize, fittingMode, samplingMode,
                                        orientationCorrection  );
-      if( maskInfo )
+      if( maskInfo && maskInfo->mAlphaMaskUrl.IsValid() )
       {
         Devel::PixelBuffer maskPixelBuffer = LoadImageFromFile( maskInfo->mAlphaMaskUrl.GetUrl(), ImageDimensions(),
                                              FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER, true  );
@@ -245,7 +245,7 @@ TextureSet TextureManager::LoadTexture(
     if( !textureSet ) // big image, no atlasing or atlasing failed
     {
       atlasingStatus = false;
-      if( !maskInfo )
+      if( !maskInfo || !maskInfo->mAlphaMaskUrl.IsValid() )
       {
         textureId = RequestLoad( url, desiredSize, fittingMode, samplingMode, TextureManager::NO_ATLAS,
                                  textureObserver, orientationCorrection, reloadPolicy, preMultiplyOnLoad );