Fix issue, agif to play a number of times of loopcount.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-image / animated-image-visual.cpp
index a1c9331..b1463ba 100755 (executable)
@@ -444,7 +444,7 @@ void AnimatedImageVisual::CreateRenderer()
 {
   bool defaultWrapMode = mWrapModeU <= WrapMode::CLAMP_TO_EDGE && mWrapModeV <= WrapMode::CLAMP_TO_EDGE;
   bool atlasing = false;
-  Shader shader = mImageVisualShaderFactory.GetShader( mFactoryCache, atlasing, defaultWrapMode );
+  Shader shader = mImageVisualShaderFactory.GetShader( mFactoryCache, atlasing, defaultWrapMode, IsRoundedCornerRequired() );
 
   Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
 
@@ -615,7 +615,7 @@ bool AnimatedImageVisual::DisplayNextFrame()
     // Wrap the frame index
     ++mCurrentFrameIndex;
 
-    if( mLoopCount < 0 || mCurrentLoopIndex <= mLoopCount)
+    if( mLoopCount < 0 || mCurrentLoopIndex < mLoopCount)
     {
       mCurrentFrameIndex %= mFrameCount;
       if( mCurrentFrameIndex == 0 )