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() << " [ "; \
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),
mFrameIndex(FIRST_FRAME_INDEX),
mCacheSize(cacheSize),
mQueue(cacheSize),
- mIsSynchronousLoading(isSynchronousLoading)
+ mIsSynchronousLoading(isSynchronousLoading),
+ mPreMultiplyOnLoad(preMultiplyOnLoad)
{
mTextureIds.resize(mFrameCount);
mIntervals.assign(mFrameCount, 0);
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,
Dali::WrapMode::Type::DEFAULT,
Dali::WrapMode::Type::DEFAULT,
synchronousLoading,
- this);
+ this,
+ preMultiplyOnLoading);
mTextureIds[frameIndex] = loadTextureId;