- // LoadComplete has been called from within RequestLoad. TextureManager must
- // therefore already have the texture cached, so make the texture ready.
- // (Use the last texture, as the texture id hasn't been assigned yet)
- mQueue.Back().mReady = true;
+ mLoadState = TextureManager::LoadState::LOAD_FINISHED;
+
+ // Reset size of Queue according to the real frame count.
+ if(mFrameCount != mAnimatedImageLoading.GetImageCount())
+ {
+ mFrameCount = mAnimatedImageLoading.GetImageCount();
+ mTextureIds.resize(mFrameCount);
+ mIntervals.assign(mFrameCount, 0u);
+ }
+
+ bool frontFrameReady = IsFrontReady();
+ // Because only one frame is on loading and the others are in mLoadWaitingQueue,
+ // mQueue.Back() is always the frame currently loaded.
+ mQueue.Back().mReady = true;
+ mIntervals[mQueue.Back().mFrameNumber] = interval;
+ // Check whether currently loaded frame is front of queue or not.
+ // If it is, notify frame ready to observer.
+ if(frontFrameReady == false && IsFrontReady())
+ {
+ mObserver.FrameReady(textureSet, interval);
+ }
+ }
+}
+
+void RollingAnimatedImageCache::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
+{
+ DALI_LOG_INFO(gAnimImgLogFilter, Debug::Concise, "AnimatedImageVisual::LoadComplete(textureId:%d) start\n", textureInformation.textureId);
+ LOG_CACHE;
+
+ if(textureInformation.textureSet)
+ {
+ Sampler sampler = Sampler::New();
+ sampler.SetWrapMode(mWrapModeU, mWrapModeV);
+ textureInformation.textureSet.SetSampler(0u, sampler);