From 796cda11e40e160d2111f307763c87208d45fc1b Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Mon, 5 Feb 2018 10:39:07 -0500 Subject: [skottie] FMA-friendlier lerp TBR= Change-Id: Id43e463da99bb0478c48ba48a909cead817e4498 Reviewed-on: https://skia-review.googlesource.com/103600 Reviewed-by: Florin Malita Commit-Queue: Florin Malita --- experimental/skottie/SkottieAnimator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'experimental') 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 <> -- cgit v1.2.3