[Tizen] Waiting until texture is loaded in animated image visual 02/257302/1 accepted/tizen/6.0/unified/20210422.132231 submit/tizen_6.0/20210422.101220
authorseungho <sbsh.baek@samsung.com>
Thu, 22 Apr 2021 07:10:05 +0000 (16:10 +0900)
committerseungho <sbsh.baek@samsung.com>
Thu, 22 Apr 2021 07:10:37 +0000 (16:10 +0900)
Change-Id: I5a05d05270ffa1dc68f98044bbd3fc7f53af7f5e
Signed-off-by: seungho <sbsh.baek@samsung.com>
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.cpp

index 20265ca..55c8c9b 100644 (file)
@@ -18,6 +18,7 @@
 #include "rolling-animated-image-cache.h"
 
 // EXTERNAL HEADERS
+#include <dali/devel-api/rendering/texture-devel.h>
 
 // INTERNAL HEADERS
 #include <dali-toolkit/devel-api/image-loader/texture-manager.h>
@@ -89,6 +90,15 @@ RollingAnimatedImageCache::~RollingAnimatedImageCache()
 
 TextureSet RollingAnimatedImageCache::Frame( uint32_t frameIndex )
 {
+  if(mQueue.IsFull() && IsFrontReady() == true)
+  {
+    TextureSet textureSet = GetFrontTextureSet();
+    if(!Dali::DevelTexture::IsUploaded(textureSet.GetTexture(0)))
+    {
+      return textureSet;
+    }
+  }
+
   bool popExist = false;
   while( !mQueue.IsEmpty() && mQueue.Front().mFrameNumber != frameIndex )
   {