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

Unified Diff: tools/Stats.h

Issue 394363003: Use __rdtsc on Windows. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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 | « bench/nanobench.cpp ('k') | tools/timer/SysTimer_windows.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/Stats.h
diff --git a/tools/Stats.h b/tools/Stats.h
index 4fddc9bc183830c0960bf3437d1725bed43e3b1f..8487a9497da6dff23cf2508dad5831065deeaa29 100644
--- a/tools/Stats.h
+++ b/tools/Stats.h
@@ -1,8 +1,6 @@
#ifndef Stats_DEFINED
#define Stats_DEFINED
-#include <math.h>
-
#include "SkString.h"
#include "SkTSort.h"
@@ -50,7 +48,7 @@ struct Stats {
s -= min;
s /= (max - min);
s *= (SK_ARRAY_COUNT(kBars) - 1);
- const size_t bar = (size_t)round(s);
+ const size_t bar = (size_t)(s + 0.5);
SK_ALWAYSBREAK(bar < SK_ARRAY_COUNT(kBars));
plot.append(kBars[bar]);
}
« no previous file with comments | « bench/nanobench.cpp ('k') | tools/timer/SysTimer_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698