X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-image%2Frolling-animated-image-cache.cpp;h=74ec0889273d5eda61b7df7ad76638a27ce0c0f0;hp=2929d890979332c20b8c74774b592bd78e364405;hb=750fadba87bb959c9af32e89e3f1bc7af6cb6dd2;hpb=ef8b89d5125aa02182a080bb3806ec87a64a2f97 diff --git a/dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp b/dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp index 2929d89..74ec088 100644 --- a/dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp +++ b/dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp @@ -28,6 +28,7 @@ namespace Debug::Filter* gAnimImgLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ANIMATED_IMAGE"); #define LOG_CACHE \ + if(gAnimImgLogFilter->IsEnabledFor(Debug::Concise)) \ { \ std::ostringstream oss; \ oss << "Size:" << mQueue.Count() << " [ "; \ @@ -65,7 +66,8 @@ RollingAnimatedImageCache::RollingAnimatedImageCache(TextureManager& ImageCache::FrameReadyObserver& observer, uint16_t cacheSize, uint16_t batchSize, - bool isSynchronousLoading) + bool isSynchronousLoading, + bool preMultiplyOnLoad) : ImageCache(textureManager, maskingData, observer, batchSize, 0u), mImageUrl(animatedImageLoading.GetUrl()), mAnimatedImageLoading(animatedImageLoading), @@ -73,7 +75,8 @@ RollingAnimatedImageCache::RollingAnimatedImageCache(TextureManager& mFrameIndex(FIRST_FRAME_INDEX), mCacheSize(cacheSize), mQueue(cacheSize), - mIsSynchronousLoading(isSynchronousLoading) + mIsSynchronousLoading(isSynchronousLoading), + mPreMultiplyOnLoad(preMultiplyOnLoad) { mTextureIds.resize(mFrameCount); mIntervals.assign(mFrameCount, 0); @@ -191,6 +194,9 @@ TextureSet RollingAnimatedImageCache::RequestFrameLoading(uint32_t frameIndex, b mLoadState = TextureManager::LoadState::LOADING; + auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD + : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY; + TextureManager::TextureId loadTextureId = TextureManager::INVALID_TEXTURE_ID; TextureSet textureSet = mTextureManager.LoadAnimatedImageTexture(mImageUrl, mAnimatedImageLoading, @@ -201,7 +207,8 @@ TextureSet RollingAnimatedImageCache::RequestFrameLoading(uint32_t frameIndex, b Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT, synchronousLoading, - this); + this, + preMultiplyOnLoading); mTextureIds[frameIndex] = loadTextureId;