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

Unified Diff: src/animator/SkScript.cpp

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/SkOperandIterpolator.cpp ('k') | src/animator/SkScriptRuntime.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkScript.cpp
diff --git a/src/animator/SkScript.cpp b/src/animator/SkScript.cpp
index bf55cb574a10daf4f1bb37766b91e0128fb6154e..1d04d1b27630bafe162cf40f872f524ed8774521 100644
--- a/src/animator/SkScript.cpp
+++ b/src/animator/SkScript.cpp
@@ -1157,7 +1157,7 @@ noMatch:
}
SkOperand indexOperand;
fOperandStack.pop(&indexOperand);
- int index = indexType == kScalar ? SkScalarFloor(indexOperand.fScalar) :
+ int index = indexType == kScalar ? SkScalarFloorToInt(indexOperand.fScalar) :
indexOperand.fS32;
SkOpType arrayType;
fTypeStack.pop(&arrayType);
@@ -1324,7 +1324,7 @@ bool SkScriptEngine::processOp() {
type1 = kScalar;
}
if (type1 == kScalar && (attributes->fLeftType == kInt || type2 == kInt)) {
- operand1.fS32 = SkScalarFloor(operand1.fScalar);
+ operand1.fS32 = SkScalarFloorToInt(operand1.fScalar);
type1 = kInt;
}
}
@@ -1339,7 +1339,7 @@ bool SkScriptEngine::processOp() {
type2 = kScalar;
}
if (type2 == kScalar && (attributes->fRightType == kInt || type1 == kInt)) {
- operand2.fS32 = SkScalarFloor(operand2.fScalar);
+ operand2.fS32 = SkScalarFloorToInt(operand2.fScalar);
type2 = kInt;
}
}
@@ -1503,7 +1503,7 @@ bool SkScriptEngine::ConvertTo(SkScriptEngine* engine, SkDisplayTypes toType, Sk
if (type == SkType_Boolean)
break;
if (type == SkType_Float)
- operand.fS32 = SkScalarFloor(operand.fScalar);
+ operand.fS32 = SkScalarFloorToInt(operand.fScalar);
else {
if (type != SkType_String) {
success = false;
« no previous file with comments | « src/animator/SkOperandIterpolator.cpp ('k') | src/animator/SkScriptRuntime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698