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

Unified Diff: tests/PictureTest.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/PathUtilsTest.cpp ('k') | tests/RTreeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 349560b21c890eb629a2fe4200ece546bb084294..a42112de8d57b262e34e78435e1d1cf5e23bbd9f 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -75,7 +75,7 @@ static SkPicture* record_bitmaps(const SkBitmap bm[], const SkPoint pos[],
return pic;
}
-static void rand_rect(SkRect* rect, SkMWCRandom& rand, SkScalar W, SkScalar H) {
+static void rand_rect(SkRect* rect, SkRandom& rand, SkScalar W, SkScalar H) {
rect->fLeft = rand.nextRangeScalar(-W, 2*W);
rect->fTop = rand.nextRangeScalar(-H, 2*H);
rect->fRight = rect->fLeft + rand.nextRangeScalar(0, W);
@@ -178,7 +178,7 @@ static void test_gatherpixelrefs(skiatest::Reporter* reporter) {
drawbitmap_proc, drawbitmaprect_proc, drawshader_proc
};
- SkMWCRandom rand;
+ SkRandom rand;
for (size_t k = 0; k < SK_ARRAY_COUNT(procs); ++k) {
SkAutoTUnref<SkPicture> pic(record_bitmaps(bm, pos, N, procs[k]));
@@ -263,7 +263,7 @@ static void test_serializing_empty_picture() {
}
#endif
-static void rand_op(SkCanvas* canvas, SkMWCRandom& rand) {
+static void rand_op(SkCanvas* canvas, SkRandom& rand) {
SkPaint paint;
SkRect rect = SkRect::MakeWH(50, 50);
@@ -284,10 +284,10 @@ static void rand_op(SkCanvas* canvas, SkMWCRandom& rand) {
}
static void test_peephole() {
- SkMWCRandom rand;
+ SkRandom rand;
for (int j = 0; j < 100; j++) {
- SkMWCRandom rand2(rand); // remember the seed
+ SkRandom rand2(rand); // remember the seed
SkPicture picture;
SkCanvas* canvas = picture.beginRecording(100, 100);
« no previous file with comments | « tests/PathUtilsTest.cpp ('k') | tests/RTreeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698