+ DALI_LOG_INFO(gAnimImgLogFilter,Debug::Concise,"AnimatedImageVisual::LoadFirstBatch() batchSize:%d cacheSize:%d\n", batchSize, cacheSize);
+
+ mUrlIndex = 0;
+ TextureManager& textureManager = mFactoryCache.GetTextureManager();
+
+ if( mAnimatedImageLoading )
+ {
+ mImageCache = new RollingAnimatedImageCache( textureManager, mAnimatedImageLoading, mFrameCount, *this, cacheSize, batchSize );
+ }
+ else if( mImageUrls )
+ {
+ if( batchSize > 0 && cacheSize > 0 )
+ {
+ if( cacheSize < numUrls )
+ {
+ mImageCache = new RollingImageCache( textureManager, *mImageUrls, *this, cacheSize, batchSize );
+ }
+ else
+ {
+ mImageCache = new FixedImageCache( textureManager, *mImageUrls, *this, batchSize );
+ }
+ }
+ else
+ {
+ mImageCache = new RollingImageCache( textureManager, *mImageUrls, *this, 1, 1 );
+ }
+ }
+
+ if (!mImageCache)
+ {
+ DALI_LOG_ERROR("mImageCache is null\n");
+ }
+}
+
+void AnimatedImageVisual::StartFirstFrame( TextureSet& textureSet )
+{
+ DALI_LOG_INFO(gAnimImgLogFilter,Debug::Concise,"AnimatedImageVisual::StartFirstFrame()\n");
+
+ mStartFirstFrame = false;
+ if(mImpl->mRenderer)
+ {
+ mImpl->mRenderer.SetTextures( textureSet );
+ }
+ Actor actor = mPlacementActor.GetHandle();
+ if( actor )
+ {
+ actor.AddRenderer( mImpl->mRenderer );
+ mPlacementActor.Reset();