From e0e7cfe44bb9d66d76120a79e5275c294bacaa22 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 9 Sep 2013 20:09:12 +0000 Subject: 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 --- tests/RTreeTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/RTreeTest.cpp') diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp index 666750b531..a907d6d588 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(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 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; -- cgit v1.2.3