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

Unified Diff: tests/RTreeTest.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 | « tests/PictureTest.cpp ('k') | tests/RandomTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RTreeTest.cpp
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 666750b531639f5188bc788cd410f582cf882e77..a907d6d5885163398b0a917b35b0ff3b55f4d203 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -23,7 +23,7 @@ struct DataRect {
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 @@ static SkIRect random_rect(SkMWCRandom& rand) {
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 @@ static bool verify_query(SkIRect query, DataRect rects[],
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 run_queries(skiatest::Reporter* reporter, SkMWCRandom& rand, DataRec
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;
« no previous file with comments | « tests/PictureTest.cpp ('k') | tests/RandomTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698