diff options
author | Florin Malita <fmalita@chromium.org> | 2018-02-05 10:39:07 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-05 16:07:46 +0000 |
commit | 796cda11e40e160d2111f307763c87208d45fc1b (patch) | |
tree | 1d42e58a78934c5c8ea182e92e2de55da5c3c703 /experimental | |
parent | ac18b469049dae1e8687eb087194b03bfa440d5b (diff) |
[skottie] FMA-friendlier lerp
TBR=
Change-Id: Id43e463da99bb0478c48ba48a909cead817e4498
Reviewed-on: https://skia-review.googlesource.com/103600
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/skottie/SkottieAnimator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/experimental/skottie/SkottieAnimator.cpp b/experimental/skottie/SkottieAnimator.cpp index c1e83f7e90..e189ebcd56 100644 --- a/experimental/skottie/SkottieAnimator.cpp +++ b/experimental/skottie/SkottieAnimator.cpp @@ -33,7 +33,7 @@ static inline T lerp(const T&, const T&, float); template <> ScalarValue lerp(const ScalarValue& v0, const ScalarValue& v1, float t) { SkASSERT(t >= 0 && t <= 1); - return v0 * (1 - t) + v1 * t; + return v0 + (v1 - v0) * t; } template <> |