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

Unified Diff: samplecode/SampleApp.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 | « samplecode/SampleAll.cpp ('k') | samplecode/SampleArc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 04d2cdd785729032dda9e1d532e1a4ee32df0d4f..bb22685e249a119d514402e615a96bb34e916b0e 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -658,8 +658,8 @@ static bool curr_title(SkWindow* wind, SkString* title) {
void SampleWindow::setZoomCenter(float x, float y)
{
- fZoomCenterX = SkFloatToScalar(x);
- fZoomCenterY = SkFloatToScalar(y);
+ fZoomCenterX = x;
+ fZoomCenterY = y;
}
bool SampleWindow::zoomIn()
@@ -1550,7 +1550,7 @@ static SkBitmap::Config cycle_configs(SkBitmap::Config c) {
}
void SampleWindow::changeZoomLevel(float delta) {
- fZoomLevel += SkFloatToScalar(delta);
+ fZoomLevel += delta;
if (fZoomLevel > 0) {
fZoomLevel = SkMinScalar(fZoomLevel, MAX_ZOOM_LEVEL);
fZoomScale = fZoomLevel + SK_Scalar1;
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleArc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698