diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-09 20:09:12 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-09 20:09:12 +0000 |
commit | e0e7cfe44bb9d66d76120a79e5275c294bacaa22 (patch) | |
tree | d3d282beb8e498659f87abafa5a651946eea6ee8 /tests/RTreeTest.cpp | |
parent | 50b2e33dc6acaed906bfdc89af9b359ea2665c52 (diff) |
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
Diffstat (limited to 'tests/RTreeTest.cpp')
-rw-r--r-- | tests/RTreeTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<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; |