lottie/trim: return early when trim operation is not needed. 29/194129/2
authorsubhransu mohanty <sub.mohanty@samsung.com>
Thu, 29 Nov 2018 07:58:13 +0000 (16:58 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Thu, 29 Nov 2018 08:42:20 +0000 (08:42 +0000)
Change-Id: Ie059e1af4df01cbd7c77117d9fe5e7e8b7c56919

src/lottie/lottieitem.cpp

index 1000856..e5f59aa 100644 (file)
@@ -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) {