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

Unified Diff: bench/ScalarBench.cpp

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 years, 3 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/RegionContainBench.cpp ('k') | bench/ShaderMaskBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ScalarBench.cpp
diff --git a/bench/ScalarBench.cpp b/bench/ScalarBench.cpp
index 405d51e95335c9fe1e9d4f215f66de54ab749933..333dd229e1866f92f88919fc9aa54f302384e7e8 100644
--- a/bench/ScalarBench.cpp
+++ b/bench/ScalarBench.cpp
@@ -56,7 +56,7 @@ int gScalarBench_NonStaticGlobal;
// handling NaN values is a lot slower. Anyway, this guy is just meant to put
// reasonable values in our arrays.
template <typename T> void init9(T array[9]) {
- SkMWCRandom rand;
+ SkRandom rand;
for (int i = 0; i < 9; i++) {
array[i] = rand.nextSScalar1();
}
@@ -102,7 +102,7 @@ private:
class IsFiniteScalarBench : public ScalarBench {
public:
IsFiniteScalarBench(void* param) : INHERITED(param, "isfinite") {
- SkMWCRandom rand;
+ SkRandom rand;
for (size_t i = 0; i < ARRAY_N; ++i) {
fArray[i] = rand.nextSScalar1();
}
@@ -141,7 +141,7 @@ class RectBoundsBench : public SkBenchmark {
public:
RectBoundsBench(void* param) : INHERITED(param) {
- SkMWCRandom rand;
+ SkRandom rand;
for (int i = 0; i < PTS; ++i) {
fPts[i].fX = rand.nextSScalar1();
fPts[i].fY = rand.nextSScalar1();
« no previous file with comments | « bench/RegionContainBench.cpp ('k') | bench/ShaderMaskBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698