Avoid skipping layer update when dynamic value set 03/319603/2 accepted/tizen/7.0/unified/20241029.163146
authorJiyun Yang <ji.yang@samsung.com>
Mon, 28 Oct 2024 10:23:11 +0000 (19:23 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Mon, 28 Oct 2024 11:12:42 +0000 (11:12 +0000)
Change-Id: Ic8cd093260705c71a165d95b4e5aabbd43e72526
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/lottie/lottieitem.cpp
src/lottie/lottieitem.h

index da87159699004e5511a4050fc2815d10695ab62a..317f770397bf069a605845489821f72d30acf9f5 100644 (file)
@@ -144,6 +144,7 @@ bool renderer::Composition::update(int frameNo, const VSize &size,
     } else {
         m.scale(sx, sy);
     }
+
     mRootLayer->update(frameNo, m, 1.0);
     return true;
 }
@@ -368,6 +369,7 @@ bool renderer::ShapeLayer::resolveKeyPath(LOTKeyPath &keyPath, uint32_t depth,
             uint32_t newDepth = keyPath.nextDepth(name(), depth);
             mRoot->resolveKeyPath(keyPath, newDepth, value);
         }
+        mHasDynamicValue = true;
         return true;
     }
     return false;
@@ -383,6 +385,7 @@ bool renderer::CompLayer::resolveKeyPath(LOTKeyPath &keyPath, uint32_t depth,
                 layer->resolveKeyPath(keyPath, newDepth, value);
             }
         }
+        mHasDynamicValue = true;
         return true;
     }
     return false;
@@ -423,7 +426,7 @@ void renderer::Layer::update(int frameNumber, const VMatrix &parentMatrix,
     }
 
     // 5. if no parent property change and layer is static then nothing to do.
-    if (!mLayerData->precompLayer() && flag().testFlag(DirtyFlagBit::None) &&
+    if (!mHasDynamicValue && !mLayerData->precompLayer() && flag().testFlag(DirtyFlagBit::None) &&
         isStatic())
         return;
 
index a1c6a1a4d4e937e3d8db03b17525eda4e3a97296..d826def7324bfcf8791d158c1510123e2692896a 100644 (file)
@@ -267,6 +267,7 @@ protected:
     DirtyFlag                  mDirtyFlag{DirtyFlagBit::All};
     bool                       mComplexContent{false};
     std::unique_ptr<CApiData>  mCApiData;
+    bool                       mHasDynamicValue{false};
 };
 
 class CompLayer final : public Layer {