[Tizen] Set the LoadSuccessflag to false after ReleaseResource() is called 89/274689/3 accepted/tizen/6.5/unified/20220513.142059 submit/tizen_6.5/20220512.140748 submit/tizen_6.5/20220513.051335 submit/tizen_6.5/20220513.083701
authortscholb <scholb.kim@samsung.com>
Fri, 6 May 2022 05:07:44 +0000 (14:07 +0900)
committertscholb <scholb.kim@samsung.com>
Fri, 6 May 2022 06:30:03 +0000 (15:30 +0900)
When the non-animated image is detached from the scene first and attached to the scene again,
webp-loading can't load webp information because it is already loaded its information.

To re-load this information, we need to set the flag to false.

Change-Id: I08c00042dc84aa40cdfbe02d462920946ed5def2

dali/internal/imaging/common/webp-loading.cpp

index 346c12d..8efdc5b 100644 (file)
@@ -193,6 +193,9 @@ public:
       free((void*)mBuffer);
       mBuffer = nullptr;
     }
+
+    // Set the flag so that webp information can be reloaded when visual is re-attached to scene.
+    mLoadSucceeded = false;
   }
 
   // Moveable but not copyable
@@ -315,6 +318,7 @@ Dali::Devel::PixelBuffer WebPLoading::LoadFrame(uint32_t frameIndex)
       free((void*)frameBuffer);
     }
     mImpl->ReleaseResource();
+
     return pixelBuffer;
   }
 #endif