X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-image%2Frolling-gif-image-cache.cpp;h=48540765c257d2f455b7d417dc102d708e29099b;hb=fedd5ae8da46cd798f730fd07c942df853e055dd;hp=ed61adb86881615d36ea469c246974d1c8903eaa;hpb=30ae04d70a9a93e49163a5cec2efafd32fc678b5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.cpp b/dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.cpp index ed61adb..4854076 100644 --- a/dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.cpp +++ b/dali-toolkit/internal/visuals/animated-image/rolling-gif-image-cache.cpp @@ -74,13 +74,17 @@ RollingGifImageCache::RollingGifImageCache( RollingGifImageCache::~RollingGifImageCache() { - while( !mQueue.IsEmpty() ) + if( mTextureManagerAlive ) { - ImageFrame imageFrame = mQueue.PopFront(); - Dali::Toolkit::TextureManager::RemoveTexture( mImageUrls[ imageFrame.mFrameNumber ].mUrl ); + while( !mQueue.IsEmpty() ) + { + ImageFrame imageFrame = mQueue.PopFront(); + Dali::Toolkit::TextureManager::RemoveTexture( mImageUrls[ imageFrame.mFrameNumber ].mUrl ); + } } } + TextureSet RollingGifImageCache::FirstFrame() { return GetFrontTextureSet(); @@ -147,12 +151,13 @@ void RollingGifImageCache::LoadBatch() AtlasUploadObserver* atlasObserver = nullptr; ImageAtlasManagerPtr imageAtlasManager = nullptr; Vector4 textureRect; + Dali::ImageDimensions textureRectSize; auto preMultiply = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY; mTextureManager.LoadTexture( mImageUrls[ imageFrame.mFrameNumber ].mUrl, ImageDimensions(), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR, maskInfo, - synchronousLoading, mImageUrls[ imageFrame.mFrameNumber ].mTextureId, textureRect, + synchronousLoading, mImageUrls[ imageFrame.mFrameNumber ].mTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT, NULL, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiply );