From: Heeyong Song Date: Mon, 20 Jan 2020 04:09:49 +0000 (+0900) Subject: Fix an issue not to unload alpha mask texture X-Git-Tag: dali_1.4.55~8 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=787daa34be8ea18f1066045cf922254fe32777c8 Fix an issue not to unload alpha mask texture ImageVisual needs the alpha mask texture id to unload the texture Change-Id: I6fe7a1b362cfbba27cdc9eba7e9ec3b3bcee087d --- diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 7ecfb81..f656e2d 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -425,7 +425,6 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v if( value.Get( alphaUrl ) ) { AllocateMaskData(); - // Immediately trigger the alpha mask loading (it may just get a cached value) mMaskingData->mAlphaMaskUrl = alphaUrl; } break; diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.cpp b/dali-toolkit/internal/visuals/texture-manager-impl.cpp index fbb8114..a2381e8 100644 --- a/dali-toolkit/internal/visuals/texture-manager-impl.cpp +++ b/dali-toolkit/internal/visuals/texture-manager-impl.cpp @@ -146,7 +146,7 @@ TextureManager::~TextureManager() TextureSet TextureManager::LoadTexture( const VisualUrl& url, Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode, - Dali::SamplingMode::Type samplingMode, const MaskingDataPointer& maskInfo, + Dali::SamplingMode::Type samplingMode, MaskingDataPointer& maskInfo, bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect, Dali::ImageDimensions& textureRectSize, bool& atlasingStatus, bool& loadingStatus, Dali::WrapMode::Type wrapModeU, Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver, @@ -252,9 +252,9 @@ TextureSet TextureManager::LoadTexture( } else { - TextureId alphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl ); + maskInfo->mAlphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl ); textureId = RequestLoad( url, - alphaMaskId, + maskInfo->mAlphaMaskId, maskInfo->mContentScaleFactor, desiredSize, fittingMode, samplingMode, diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.h b/dali-toolkit/internal/visuals/texture-manager-impl.h index b782517..651bc44 100755 --- a/dali-toolkit/internal/visuals/texture-manager-impl.h +++ b/dali-toolkit/internal/visuals/texture-manager-impl.h @@ -174,7 +174,7 @@ public: * @param[in] desiredSize The size the image is likely to appear at. This can be set to 0,0 for automatic * @param[in] fittingMode The FittingMode to use * @param[in] samplingMode The SamplingMode to use - * @param[in] maskInfo Mask info structure + * @param[in, out] maskInfo Mask info structure * @param[in] synchronousLoading true if the URL should be loaded synchronously * @param[out] textureId, The textureId of the URL * @param[out] textureRect The rectangle within the texture atlas that this URL occupies, @@ -204,7 +204,7 @@ public: Dali::ImageDimensions desiredSize, Dali::FittingMode::Type fittingMode, Dali::SamplingMode::Type samplingMode, - const MaskingDataPointer& maskInfo, + MaskingDataPointer& maskInfo, bool synchronousLoading, TextureManager::TextureId& textureId, Vector4& textureRect,