projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a5b208
)
parser: optimize zero length path keyframes
author
Subhransu Mohanty
<sub.mohanty@samsung.com>
Tue, 11 Aug 2020 03:32:19 +0000
(12:32 +0900)
committer
Jongmin Lee
<jm105.lee@samsung.com>
Mon, 17 Aug 2020 22:22:02 +0000
(07:22 +0900)
src/lottie/lottiemodel.h
patch
|
blob
|
history
diff --git
a/src/lottie/lottiemodel.h
b/src/lottie/lottiemodel.h
index
4a7db32
..
6365887
100644
(file)
--- a/
src/lottie/lottiemodel.h
+++ b/
src/lottie/lottiemodel.h
@@
-174,8
+174,14
@@
struct Value<VPointF> {
mOutTangent = mStartValue + mOutTangent;
mBezierLength = VBezier::fromPoints(mStartValue, mOutTangent,
mInTangent, mEndValue).length();
+ if (vIsZero(mBezierLength)) {
+ // this segment has zero length.
+ // so disable expensive path computaion.
+ mPathKeyFrame = false;
+ }
}
}
+
VPointF at(float t) const
{
if (mPathKeyFrame) {