X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-image%2Frolling-image-cache.cpp;h=390af53b9f9f73d19f095a545fa1cb321e2b9b66;hb=2bba756a645043d8c1c4023a75966401d531827c;hp=7a84f5b225894691a6524487ac4605f9aca24d5d;hpb=750fadba87bb959c9af32e89e3f1bc7af6cb6dd2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp b/dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp index 7a84f5b..390af53 100644 --- a/dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp +++ b/dali-toolkit/internal/visuals/animated-image/rolling-image-cache.cpp @@ -168,7 +168,7 @@ void RollingImageCache::LoadBatch(uint32_t frameIndex) TextureManager::TextureId loadTextureId = TextureManager::INVALID_TEXTURE_ID; TextureSet textureSet = mTextureManager.LoadTexture( - url, ImageDimensions(), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR, mMaskingData, synchronousLoading, loadTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiply); + url, ImageDimensions(), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR, mMaskingData, synchronousLoading, loadTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiply); mImageUrls[imageFrame.mUrlIndex].mTextureId = loadTextureId; mRequestingLoad = false; @@ -181,7 +181,14 @@ void RollingImageCache::LoadBatch(uint32_t frameIndex) TextureSet RollingImageCache::GetFrontTextureSet() const { TextureManager::TextureId textureId = GetCachedTextureId(0); - return mTextureManager.GetTextureSet(textureId); + TextureSet textureSet = mTextureManager.GetTextureSet(textureId); + if(textureSet) + { + Sampler sampler = Sampler::New(); + sampler.SetWrapMode(Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT); + textureSet.SetSampler(0u, sampler); + } + return textureSet; } TextureManager::TextureId RollingImageCache::GetCachedTextureId(int index) const @@ -197,7 +204,6 @@ void RollingImageCache::PopFrontCache() if(mMaskingData && mMaskingData->mAlphaMaskId != TextureManager::INVALID_TEXTURE_ID) { - mTextureManager.Remove(mMaskingData->mAlphaMaskId, this); if(mQueue.IsEmpty()) { mMaskingData->mAlphaMaskId = TextureManager::INVALID_TEXTURE_ID; @@ -244,7 +250,13 @@ void RollingImageCache::LoadComplete(bool loadSuccess, TextureInformation textur if(!frontFrameReady && IsFrontReady()) { - mObserver.FrameReady(mTextureManager.GetTextureSet(textureInformation.textureId), mInterval); + if(textureInformation.textureSet) + { + Sampler sampler = Sampler::New(); + sampler.SetWrapMode(Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT); + textureInformation.textureSet.SetSampler(0u, sampler); + } + mObserver.FrameReady(textureInformation.textureSet, mInterval); } } else