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

Unified Diff: tests/StrokerTest.cpp

Issue 805963002: There can be only one (SkRandom)! (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 6 years 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 | « src/effects/SkDiscretePathEffect.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/StrokerTest.cpp
diff --git a/tests/StrokerTest.cpp b/tests/StrokerTest.cpp
index 03e0624a0d3b7958b95b5f9f6dbdfd84ae4e8ee4..b588cc6d105a3bbd043cdc8efa7fe8d8923c55a6 100755
--- a/tests/StrokerTest.cpp
+++ b/tests/StrokerTest.cpp
@@ -116,18 +116,18 @@ DEF_TEST(CubicStrokerSet, reporter) {
cubicPairSetTest(tests, tests_count);
}
-static SkScalar unbounded(SkLCGRandom& r) {
+static SkScalar unbounded(SkRandom& r) {
uint32_t val = r.nextU();
return SkBits2Float(val);
}
-static SkScalar unboundedPos(SkLCGRandom& r) {
+static SkScalar unboundedPos(SkRandom& r) {
uint32_t val = r.nextU() & 0x7fffffff;
return SkBits2Float(val);
}
DEF_TEST(QuadStrokerUnbounded, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
@@ -165,7 +165,7 @@ DEF_TEST(QuadStrokerUnbounded, reporter) {
}
DEF_TEST(CubicStrokerUnbounded, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
@@ -206,7 +206,7 @@ DEF_TEST(CubicStrokerUnbounded, reporter) {
}
DEF_TEST(QuadStrokerConstrained, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
@@ -257,7 +257,7 @@ DEF_TEST(QuadStrokerConstrained, reporter) {
}
DEF_TEST(CubicStrokerConstrained, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
@@ -316,7 +316,7 @@ DEF_TEST(CubicStrokerConstrained, reporter) {
}
DEF_TEST(QuadStrokerRange, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
@@ -361,7 +361,7 @@ DEF_TEST(QuadStrokerRange, reporter) {
}
DEF_TEST(CubicStrokerRange, reporter) {
- SkLCGRandom r;
+ SkRandom r;
SkPaint p;
p.setStyle(SkPaint::kStroke_Style);
#if defined(SK_DEBUG) && QUAD_STROKE_APPROXIMATION
« no previous file with comments | « src/effects/SkDiscretePathEffect.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698