diff options
author | 2013-12-17 19:22:07 +0000 | |
---|---|---|
committer | 2013-12-17 19:22:07 +0000 | |
commit | e1ca705cac4b946993f6cbf798e2a0ba27e739f3 (patch) | |
tree | 9757af858cadeea671264651780935b00d8c0252 /src/animator/SkScript.cpp | |
parent | 3fb15f4d21292a319dc6522bfc99c89a7a5eac68 (diff) |
deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/111353003
git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/animator/SkScript.cpp')
-rw-r--r-- | src/animator/SkScript.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/animator/SkScript.cpp b/src/animator/SkScript.cpp index bf55cb574a..1d04d1b276 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; |