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

Unified Diff: src/views/SkTouchGesture.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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/utils/win/SkDWriteGeometrySink.cpp ('k') | tests/AAClipTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkTouchGesture.cpp
diff --git a/src/views/SkTouchGesture.cpp b/src/views/SkTouchGesture.cpp
index 3becccd8fcf5ba6429587dcb8bd467cab5b4cf3e..9b02417771e0f209e8e733a40e2d741640ca2620 100644
--- a/src/views/SkTouchGesture.cpp
+++ b/src/views/SkTouchGesture.cpp
@@ -50,7 +50,7 @@ static void unit_axis_align(SkVector* unit) {
void SkFlingState::reset(float sx, float sy) {
fActive = true;
- fDirection.set(SkFloatToScalar(sx), SkFloatToScalar(sy));
+ fDirection.set(sx, sy);
fSpeed0 = SkPoint::Normalize(&fDirection);
fSpeed0 = pin_max_fling(fSpeed0);
fTime0 = getseconds();
@@ -82,7 +82,7 @@ bool SkFlingState::evaluateMatrix(SkMatrix* matrix) {
tx = (float)sk_float_round2int(tx);
ty = (float)sk_float_round2int(ty);
}
- matrix->setTranslate(SkFloatToScalar(tx), SkFloatToScalar(ty));
+ matrix->setTranslate(tx, ty);
// printf("---- evaluate (%g %g)\n", tx, ty);
return true;
@@ -182,7 +182,7 @@ int SkTouchGesture::findRec(void* owner) const {
}
static SkScalar center(float pos0, float pos1) {
- return SkFloatToScalar((pos0 + pos1) * 0.5f);
+ return (pos0 + pos1) * 0.5f;
}
static const float MAX_ZOOM_SCALE = 4;
« no previous file with comments | « src/utils/win/SkDWriteGeometrySink.cpp ('k') | tests/AAClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698