Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index 82d42fdfc45d94ed7d80ec52729ef578f41ad98a..04b1cb02589ceca9c802f20021707ceb731e06cc 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -1320,18 +1320,18 @@ void SampleWindow::beforeChild(SkView* child, SkCanvas* canvas) { |
static const SkScalar gAnimPeriod = 10 * SK_Scalar1; |
static const SkScalar gAnimMag = SK_Scalar1 / 1000; |
SkScalar t = SkScalarMod(secs, gAnimPeriod); |
- if (SkScalarFloorToInt(SkScalarDiv(secs, gAnimPeriod)) & 0x1) { |
+ if (SkScalarFloorToInt(secs / gAnimPeriod) & 0x1) { |
t = gAnimPeriod - t; |
} |
t = 2 * t - gAnimPeriod; |
- t = SkScalarMul(SkScalarDiv(t, gAnimPeriod), gAnimMag); |
+ t *= gAnimMag / gAnimPeriod; |
SkMatrix m; |
m.reset(); |
#if 1 |
m.setPerspY(t); |
#else |
m.setPerspY(SK_Scalar1 / 1000); |
- m.setSkewX(SkScalarDiv(8, 25)); |
+ m.setSkewX(8.0f / 25); |
m.dump(); |
#endif |
canvas->concat(m); |