} // namespace
RollingAnimatedImageCache::RollingAnimatedImageCache(TextureManager& textureManager,
+ ImageDimensions size,
+ Dali::FittingMode::Type fittingMode,
+ Dali::SamplingMode::Type samplingMode,
AnimatedImageLoading& animatedImageLoading,
TextureManager::MaskingDataPointer& maskingData,
ImageCache::FrameReadyObserver& observer,
const Dali::WrapMode::Type& wrapModeV,
bool isSynchronousLoading,
bool preMultiplyOnLoad)
-: ImageCache(textureManager, maskingData, observer, batchSize, 0u),
+: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, 0u),
mImageUrl(animatedImageLoading.GetUrl()),
mAnimatedImageLoading(animatedImageLoading),
mFrameCount(SINGLE_IMAGE_COUNT),
frameIndex,
loadTextureId,
mMaskingData,
- SamplingMode::BOX_THEN_LINEAR,
- mWrapModeU,
- mWrapModeV,
+ mDesiredSize,
+ mFittingMode,
+ mSamplingMode,
synchronousLoading,
this,
preMultiplyOnLoading);
+ if(textureSet)
+ {
+ Sampler sampler = Sampler::New();
+ sampler.SetWrapMode(mWrapModeU, mWrapModeV);
+ textureSet.SetSampler(0u, sampler);
+ }
mTextureIds[frameIndex] = loadTextureId;
{
DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "RollingAnimatedImageCache::GetFrontTextureSet() FrameNumber:%d\n", mQueue[0].mFrameNumber);
- TextureManager::TextureId textureId = GetCachedTextureId(0);
- return mTextureManager.GetTextureSet(textureId);
+ TextureManager::TextureId textureId = GetCachedTextureId(0);
+ TextureSet textureSet = mTextureManager.GetTextureSet(textureId);
+ if(textureSet)
+ {
+ Sampler sampler = Sampler::New();
+ sampler.SetWrapMode(mWrapModeU, mWrapModeV);
+ textureSet.SetSampler(0u, sampler);
+ }
+ return textureSet;
}
TextureManager::TextureId RollingAnimatedImageCache::GetCachedTextureId(int index) const
DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::LoadComplete(textureId:%d) start\n", textureInformation.textureId);
LOG_CACHE;
- TextureSet textureSet = mTextureManager.GetTextureSet(textureInformation.textureId);
- if(textureSet)
+ if(textureInformation.textureSet)
{
Sampler sampler = Sampler::New();
sampler.SetWrapMode(mWrapModeU, mWrapModeV);
- textureSet.SetSampler(0u, sampler);
+ textureInformation.textureSet.SetSampler(0u, sampler);
}
- MakeFrameReady(loadSuccess, textureSet, textureInformation.interval);
+ MakeFrameReady(loadSuccess, textureInformation.textureSet, textureInformation.interval);
if(loadSuccess)
{