diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 90108ec9..80600cbe 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -109,6 +109,7 @@ renderer::Composition::Composition(std::shared_ptr model) void renderer::Composition::setValue(const std::string &keypath, LOTVariant & value) { + mHasDynamicValue = true; LOTKeyPath key(keypath); mRootLayer->resolveKeyPath(key, 0, value); } @@ -117,7 +118,7 @@ bool renderer::Composition::update(int frameNo, const VSize &size, bool keepAspectRatio) { // check if cached frame is same as requested frame. - if ((mViewSize == size) && (mCurFrameNo == frameNo) && + if (!mHasDynamicValue && (mViewSize == size) && (mCurFrameNo == frameNo) && (mKeepAspectRatio == keepAspectRatio)) return false; diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h index b0708976..d3ffb7ac 100644 --- a/src/lottie/lottieitem.h +++ b/src/lottie/lottieitem.h @@ -207,6 +207,7 @@ class Composition { VArenaAlloc mAllocator{2048}; int mCurFrameNo; bool mKeepAspectRatio{true}; + bool mHasDynamicValue{false}; }; class Layer {