From: subhransu mohanty Date: Thu, 29 Nov 2018 07:58:13 +0000 (+0900) Subject: lottie/trim: return early when trim operation is not needed. X-Git-Tag: submit/tizen/20181211.054046~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e307312f752f4c4c35b1bb8d566aaf4000f0470;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/trim: return early when trim operation is not needed. Change-Id: Ie059e1af4df01cbd7c77117d9fe5e7e8b7c56919 --- 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) {