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

Unified Diff: src/animator/SkScriptTokenizer.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/SkScriptRuntime.cpp ('k') | src/animator/SkSnapshot.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkScriptTokenizer.cpp
diff --git a/src/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp
index 24084453f668f194f2af27dce07bca9a0e801441..8fc5d802cb1b5acac67fb828f11b184fc5dbcfc4 100644
--- a/src/animator/SkScriptTokenizer.cpp
+++ b/src/animator/SkScriptTokenizer.cpp
@@ -984,7 +984,7 @@ void SkScriptEngine2::processLogicalOp(Op op) {
SkScriptValue2 value;
fValueStack.pop(&value);
SkASSERT(value.fType == SkOperand2::kS32 || value.fType == SkOperand2::kScalar); // !!! add error handling (although, could permit strings eventually)
- int index = value.fType == SkOperand2::kScalar ? SkScalarFloor(value.fOperand.fScalar) :
+ int index = value.fType == SkOperand2::kScalar ? SkScalarFloorToInt(value.fOperand.fScalar) :
value.fOperand.fS32;
SkScriptValue2 arrayValue;
fValueStack.pop(&arrayValue);
@@ -1200,7 +1200,7 @@ bool SkScriptEngine2::ConvertTo(SkScriptEngine2* engine, SkOperand2::OpType toTy
switch (toType) {
case SkOperand2::kS32:
if (type == SkOperand2::kScalar)
- operand.fS32 = SkScalarFloor(operand.fScalar);
+ operand.fS32 = SkScalarFloorToInt(operand.fScalar);
else {
SkASSERT(type == SkOperand2::kString);
success = SkParse::FindS32(operand.fString->c_str(), &operand.fS32) != NULL;
« no previous file with comments | « src/animator/SkScriptRuntime.cpp ('k') | src/animator/SkSnapshot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698