From f43c58e4cc19a025a377dec37546d54cc8acd875 Mon Sep 17 00:00:00 2001 From: Sunghyun kim Date: Mon, 13 Jan 2020 14:41:25 +0900 Subject: [PATCH] [Tizen]Unload AlphaMask when application set empty path 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.cpp b/dali-toolkit/internal/visuals/texture-manager-impl.cpp index 57384b3..4512a08 100644 --- a/dali-toolkit/internal/visuals/texture-manager-impl.cpp +++ b/dali-toolkit/internal/visuals/texture-manager-impl.cpp @@ -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 ); -- 2.7.4