fix warnings
Review URL: https://codereview.appspot.com/7060053
git-svn-id: http://skia.googlecode.com/svn/trunk@7070 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index 65fc42a..73c9a7d 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -450,7 +450,7 @@
gLogger.logError("Missing scaleFactor for --scale\n");
PRINT_USAGE_AND_EXIT;
}
- scaleFactor = atof(*argv);
+ scaleFactor = SkDoubleToScalar(atof(*argv));
} else if (0 == strcmp(*argv, "--tiles")) {
++argv;
if (argv >= stop) {
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index e7ae036..e3e4318 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -425,7 +425,7 @@
usage(argv0);
exit(-1);
}
- scaleFactor = atof(*argv);
+ scaleFactor = SkDoubleToScalar(atof(*argv));
} else if (0 == strcmp(*argv, "--tiles")) {
++argv;
if (argv >= stop) {
diff --git a/tools/skdiff_html.cpp b/tools/skdiff_html.cpp
index d83b736..6f3c3b0 100644
--- a/tools/skdiff_html.cpp
+++ b/tools/skdiff_html.cpp
@@ -125,22 +125,22 @@
print_pixel_count(stream, diff);
}
stream->writeText("<br>");
- if (static_cast<int>(diff.fAverageMismatchA) > 0) {
+ if (SkScalarRoundToInt(diff.fAverageMismatchA) > 0) {
stream->writeText("<br>Average alpha channel mismatch ");
- stream->writeDecAsText(static_cast<float>(diff.fAverageMismatchA));
+ stream->writeDecAsText(SkScalarRoundToInt(diff.fAverageMismatchA));
}
stream->writeText("<br>Max alpha channel mismatch ");
- stream->writeDecAsText(static_cast<int>(diff.fMaxMismatchA));
+ stream->writeDecAsText(SkScalarRoundToInt(diff.fMaxMismatchA));
stream->writeText("<br>Total alpha channel mismatch ");
stream->writeDecAsText(static_cast<int>(diff.fTotalMismatchA));
stream->writeText("<br>");
stream->writeText("<br>Average color mismatch ");
- stream->writeDecAsText(static_cast<int>(MAX3(diff.fAverageMismatchR,
- diff.fAverageMismatchG,
- diff.fAverageMismatchB)));
+ stream->writeDecAsText(SkScalarRoundToInt(MAX3(diff.fAverageMismatchR,
+ diff.fAverageMismatchG,
+ diff.fAverageMismatchB)));
stream->writeText("<br>Max color mismatch ");
stream->writeDecAsText(MAX3(diff.fMaxMismatchR,
diff.fMaxMismatchG,