Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: src/animator/SkAnimatorScript2.cpp

Issue 1138263002: Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/animator/SkAnimatorScript.cpp ('k') | src/animator/SkDisplayPost.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkAnimatorScript2.cpp
diff --git a/src/animator/SkAnimatorScript2.cpp b/src/animator/SkAnimatorScript2.cpp
index 28912fb6d005ce8ef33320f261a25a6460faa465..80ae0c6aa84c49871d77706719a9dba4494f4e1a 100644
--- a/src/animator/SkAnimatorScript2.cpp
+++ b/src/animator/SkAnimatorScript2.cpp
@@ -412,7 +412,7 @@
if (info->fType != SkType_MemberProperty && info->fType != SkType_MemberFunction)
value->fS32 = *(int32_t*) info->memberData(displayable); // OK for SkScalar too
if (type == SkType_MSec) {
- value->fScalar = value->fS32 * 0.001f;
+ value->fScalar = SkScalarDiv((SkScalar) value->fS32, 1000); // dividing two ints is the same as dividing two scalars
type = SkType_Float;
}
break;
« no previous file with comments | « src/animator/SkAnimatorScript.cpp ('k') | src/animator/SkDisplayPost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698