Change old PRG to be SkLCGRandom; change new one to SkRandom
The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to
rebaseline GMs.
R=reed@google.com, bsalomon@google.com
Author: jvanverth@google.com
Review URL: https://chromiumcodereview.appspot.com/23576015
git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 666750b..a907d6d 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -23,7 +23,7 @@
void* data;
};
-static SkIRect random_rect(SkMWCRandom& rand) {
+static SkIRect random_rect(SkRandom& rand) {
SkIRect rect = {0,0,0,0};
while (rect.isEmpty()) {
rect.fLeft = rand.nextS() % 1000;
@@ -35,7 +35,7 @@
return rect;
}
-static void random_data_rects(SkMWCRandom& rand, DataRect out[], int n) {
+static void random_data_rects(SkRandom& rand, DataRect out[], int n) {
for (int i = 0; i < n; ++i) {
out[i].rect = random_rect(rand);
out[i].data = reinterpret_cast<void*>(i);
@@ -68,7 +68,7 @@
return found == expected;
}
-static void run_queries(skiatest::Reporter* reporter, SkMWCRandom& rand, DataRect rects[],
+static void run_queries(skiatest::Reporter* reporter, SkRandom& rand, DataRect rects[],
SkRTree& tree) {
for (size_t i = 0; i < NUM_QUERIES; ++i) {
SkTDArray<void*> hits;
@@ -80,7 +80,7 @@
static void rtree_test_main(SkRTree* rtree, skiatest::Reporter* reporter) {
DataRect rects[NUM_RECTS];
- SkMWCRandom rand;
+ SkRandom rand;
REPORTER_ASSERT(reporter, NULL != rtree);
int expectedDepthMin = -1;