Fixed Windows compiler complaints

http://codereview.appspot.com/6392044



git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/views/SkTouchGesture.cpp b/src/views/SkTouchGesture.cpp
index 31adc74..1828f03 100644
--- a/src/views/SkTouchGesture.cpp
+++ b/src/views/SkTouchGesture.cpp
@@ -14,9 +14,9 @@
 
 #define DISCRETIZE_TRANSLATE_TO_AVOID_FLICKER   true
 
-static const float MAX_FLING_SPEED = 1500;
+static const SkScalar MAX_FLING_SPEED = SkIntToScalar(1500);
 
-static float pin_max_fling(float speed) {
+static SkScalar pin_max_fling(SkScalar speed) {
     if (speed > MAX_FLING_SPEED) {
         speed = MAX_FLING_SPEED;
     }
@@ -50,7 +50,7 @@
 
 void SkFlingState::reset(float sx, float sy) {
     fActive = true;
-    fDirection.set(sx, sy);
+    fDirection.set(SkFloatToScalar(sx), SkFloatToScalar(sy));
     fSpeed0 = SkPoint::Normalize(&fDirection);
     fSpeed0 = pin_max_fling(fSpeed0);
     fTime0 = getseconds();
@@ -82,7 +82,7 @@
         tx = (float)sk_float_round2int(tx);
         ty = (float)sk_float_round2int(ty);
     }
-    matrix->setTranslate(tx, ty);
+    matrix->setTranslate(SkFloatToScalar(tx), SkFloatToScalar(ty));
 //    printf("---- evaluate (%g %g)\n", tx, ty);
 
     return true;
@@ -181,8 +181,8 @@
     return -1;
 }
 
-static float center(float pos0, float pos1) {
-    return (pos0 + pos1) * 0.5f;
+static SkScalar center(float pos0, float pos1) {
+    return SkFloatToScalar((pos0 + pos1) * 0.5f);
 }
 
 static const float MAX_ZOOM_SCALE = 4;
@@ -190,7 +190,7 @@
 
 float SkTouchGesture::limitTotalZoom(float scale) const {
     // this query works 'cause we know that we're square-scale w/ no skew/rotation
-    const float curr = fGlobalM[0];
+    const float curr = SkScalarToFloat(fGlobalM[0]);
     
     if (scale > 1 && curr * scale > MAX_ZOOM_SCALE) {
         scale = MAX_ZOOM_SCALE / curr;