diff --git a/modules/skottie/src/SkottieValue.cpp b/modules/skottie/src/SkottieValue.cpp index edfa891aa1..a5fa8d5f34 100644 --- a/modules/skottie/src/SkottieValue.cpp +++ b/modules/skottie/src/SkottieValue.cpp @@ -59,10 +59,10 @@ SkColor ValueTraits::As(const VectorValue& v) { b = v.size() > 2 ? v[2] : 0, a = v.size() > 3 ? v[3] : 1; - return SkColorSetARGB(SkTPin(a, 0, 1) * 255, - SkTPin(r, 0, 1) * 255, - SkTPin(g, 0, 1) * 255, - SkTPin(b, 0, 1) * 255); + return SkColorSetARGB(SkScalarRoundToInt(SkTPin(a, 0.0f, 1.0f) * 255), + SkScalarRoundToInt(SkTPin(r, 0.0f, 1.0f) * 255), + SkScalarRoundToInt(SkTPin(g, 0.0f, 1.0f) * 255), + SkScalarRoundToInt(SkTPin(b, 0.0f, 1.0f) * 255)); } template <>