From 9e307312f752f4c4c35b1bb8d566aaf4000f0470 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Thu, 29 Nov 2018 16:58:13 +0900 Subject: [PATCH 1/1] lottie/trim: return early when trim operation is not needed. Change-Id: Ie059e1af4df01cbd7c77117d9fe5e7e8b7c56919 --- src/lottie/lottieitem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 1000856..e5f59aa 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -1066,6 +1066,12 @@ void LOTTrimItem::update() return; } + if (vCompare(std::fabs(mCache.mSegment.start - mCache.mSegment.end) , 1)) { + for (auto &i : mPathItems) { + i->updatePath(i->localPath()); + } + return; + } if (mData->type() == LOTTrimData::TrimType::Simultaneously) { for (auto &i : mPathItems) { -- 2.7.4