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

Unified Diff: tests/PathTest.cpp

Issue 12334131: Change random number generator for tests to SkMWCRandom (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Rebase to latest Created 7 years, 10 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/PackBitsTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
===================================================================
--- tests/PathTest.cpp (revision 7902)
+++ tests/PathTest.cpp (working copy)
@@ -290,7 +290,7 @@
// Note: PathBench::ArbRoundRectBench performs almost exactly
// the same test (but with drawing)
static void test_arb_round_rect_is_convex(skiatest::Reporter* reporter) {
- SkRandom rand;
+ SkMWCRandom rand;
SkRect r;
for (int i = 0; i < 5000; ++i) {
@@ -317,7 +317,7 @@
// Note: PathBench::ArbRoundRectBench performs almost exactly
// the same test (but with drawing)
static void test_arb_zero_rad_round_rect_is_rect(skiatest::Reporter* reporter) {
- SkRandom rand;
+ SkMWCRandom rand;
SkRect r;
for (int i = 0; i < 5000; ++i) {
@@ -452,7 +452,7 @@
static void test_addPoly(skiatest::Reporter* reporter) {
SkPoint pts[32];
- SkRandom rand;
+ SkMWCRandom rand;
for (size_t i = 0; i < SK_ARRAY_COUNT(pts); ++i) {
pts[i].fX = rand.nextSScalar1();
@@ -1862,7 +1862,7 @@
}
// Max of 10 segments, max 3 points per segment
- SkRandom rand(9876543);
+ SkMWCRandom rand(9876543);
SkPoint expectedPts[31]; // May have leading moveTo
SkPath::Verb expectedVerbs[22]; // May have leading moveTo
SkPath::Verb nextVerb;
« no previous file with comments | « tests/PackBitsTest.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698