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
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index b507570..e3be006 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -87,7 +87,7 @@
     canvas.drawColor(SK_ColorBLACK);
 }
 
-static SkIRect rand_rect(SkMWCRandom& rand, int n) {
+static SkIRect rand_rect(SkRandom& rand, int n) {
     int x = rand.nextS() % n;
     int y = rand.nextS() % n;
     int w = rand.nextU() % n;
@@ -95,7 +95,7 @@
     return SkIRect::MakeXYWH(x, y, w, h);
 }
 
-static void make_rand_rgn(SkRegion* rgn, SkMWCRandom& rand) {
+static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) {
     int count = rand.nextU() % 20;
     for (int i = 0; i < count; ++i) {
         rgn->op(rand_rect(rand, 100), SkRegion::kXOR_Op);
@@ -128,7 +128,7 @@
 
 // aaclip.setRegion should create idential masks to the region
 static void test_rgn(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 1000; i++) {
         SkRegion rgn;
         make_rand_rgn(&rgn, rand);
@@ -232,7 +232,7 @@
     REPORTER_ASSERT(reporter, mask.fBounds.isEmpty());
 }
 
-static void rand_irect(SkIRect* r, int N, SkMWCRandom& rand) {
+static void rand_irect(SkIRect* r, int N, SkRandom& rand) {
     r->setXYWH(0, 0, rand.nextU() % N, rand.nextU() % N);
     int dx = rand.nextU() % (2*N);
     int dy = rand.nextU() % (2*N);
@@ -241,7 +241,7 @@
 }
 
 static void test_irect(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
 
     for (int i = 0; i < 10000; i++) {
         SkAAClip clip0, clip1;
diff --git a/tests/BitmapGetColorTest.cpp b/tests/BitmapGetColorTest.cpp
index 06e3760..11c22e6 100644
--- a/tests/BitmapGetColorTest.cpp
+++ b/tests/BitmapGetColorTest.cpp
@@ -10,11 +10,11 @@
 #include "SkRect.h"
 #include "SkRandom.h"
 
-static int nextRand(SkMWCRandom& rand, int min, int max) {
+static int nextRand(SkRandom& rand, int min, int max) {
     return min + (int)rand.nextRangeU(0, max - min);
 }
 
-static void rand_irect(SkIRect* rect, int W, int H, SkMWCRandom& rand) {
+static void rand_irect(SkIRect* rect, int W, int H, SkRandom& rand) {
     const int DX = W / 2;
     const int DY = H / 2;
 
@@ -57,7 +57,7 @@
     bm8.setConfig(SkBitmap::kA8_Config, W, H);
     bm8.allocPixels();
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 10000; ++i) {
         SkIRect area;
         rand_irect(&area, W, H, rand);
diff --git a/tests/ClampRangeTest.cpp b/tests/ClampRangeTest.cpp
index 2462725..1d6bcd2 100644
--- a/tests/ClampRangeTest.cpp
+++ b/tests/ClampRangeTest.cpp
@@ -107,7 +107,7 @@
     test_range(ff(1)/2, ff(16384), 100);
     test_range(ff(1)/2, ff(-16384), 100);
 
-    SkMWCRandom rand;
+    SkRandom rand;
 
     // test non-overflow cases
     for (int i = 0; i < 1000000; i++) {
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index cbed193..c16220e 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -921,7 +921,7 @@
         add_oval,
     };
 
-    SkMWCRandom r;
+    SkRandom r;
 
     for (int i = 0; i < kNumTests; ++i) {
         // Randomly generate a clip stack.
diff --git a/tests/ColorFilterTest.cpp b/tests/ColorFilterTest.cpp
index 0225649..4016f21 100644
--- a/tests/ColorFilterTest.cpp
+++ b/tests/ColorFilterTest.cpp
@@ -35,7 +35,7 @@
 #define ILLEGAL_MODE    ((SkXfermode::Mode)-1)
 
 static void test_asColorMode(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
 
     for (int mode = 0; mode <= SkXfermode::kLastMode; mode++) {
         SkColor color = rand.nextU();
diff --git a/tests/ColorTest.cpp b/tests/ColorTest.cpp
index c6e5485..a720ff4 100644
--- a/tests/ColorTest.cpp
+++ b/tests/ColorTest.cpp
@@ -146,7 +146,7 @@
 */
 /*
 static void test_interp(skiatest::Reporter* reporter) {
-    SkMWCRandom r;
+    SkRandom r;
 
     U8CPU a0 = 0;
     U8CPU a255 = 255;
@@ -163,7 +163,7 @@
 */
 
 static inline void test_fast_interp(skiatest::Reporter* reporter) {
-    SkMWCRandom r;
+    SkRandom r;
 
     U8CPU a0 = 0;
     U8CPU a255 = 255;
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 0538a12..bdfa755 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -12,7 +12,7 @@
 #include "SkRandom.h"
 #include "SkMatrixUtils.h"
 
-static void rand_matrix(SkMatrix* mat, SkMWCRandom& rand, unsigned mask) {
+static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) {
     mat->setIdentity();
     if (mask & SkMatrix::kTranslate_Mask) {
         mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1());
@@ -29,7 +29,7 @@
     }
 }
 
-static void rand_size(SkISize* size, SkMWCRandom& rand) {
+static void rand_size(SkISize* size, SkRandom& rand) {
     size->set(rand.nextU() & 0xFFFF, rand.nextU() & 0xFFFF);
 }
 
@@ -43,7 +43,7 @@
 
     SkMatrix mat;
     SkISize  size;
-    SkMWCRandom rand;
+    SkRandom rand;
 
     // assert: translate-only no-filter can always be treated as sprite
     for (int i = 0; i < 1000; ++i) {
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 3164658..10380f7 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -22,7 +22,7 @@
 #include "SkRandom.h"
 #include "Test.h"
 
-void GrGLProgramDesc::setRandom(SkMWCRandom* random,
+void GrGLProgramDesc::setRandom(SkRandom* random,
                                 const GrGpuGL* gpu,
                                 const GrRenderTarget* dstRenderTarget,
                                 const GrTexture* dstCopyTexture,
@@ -132,7 +132,7 @@
 
     static const int NUM_TESTS = 512;
 
-    SkMWCRandom random;
+    SkRandom random;
     for (int t = 0; t < NUM_TESTS; ++t) {
 
 #if 0
diff --git a/tests/GrMemoryPoolTest.cpp b/tests/GrMemoryPoolTest.cpp
index 0ed77bf..f7866ad 100644
--- a/tests/GrMemoryPoolTest.cpp
+++ b/tests/GrMemoryPoolTest.cpp
@@ -47,7 +47,7 @@
 
     SK_DECLARE_INST_COUNT_ROOT(A);
 
-    static A* Create(SkMWCRandom* r);
+    static A* Create(SkRandom* r);
 
     static void SetAllocator(size_t preallocSize, size_t minAllocSize) {
 #if SK_ENABLE_INST_COUNT
@@ -160,7 +160,7 @@
     typedef A INHERITED;
 };
 
-A* A::Create(SkMWCRandom* r) {
+A* A::Create(SkRandom* r) {
     switch (r->nextRangeU(0, 4)) {
         case 0:
             return new A;
@@ -201,7 +201,7 @@
     // number of iterations
     static const int kCheckPeriod = 500;
 
-    SkMWCRandom r;
+    SkRandom r;
     for (size_t s = 0; s < SK_ARRAY_COUNT(gSizes); ++s) {
         A::SetAllocator(gSizes[s][0], gSizes[s][1]);
         for (size_t c = 0; c < SK_ARRAY_COUNT(gCreateFraction); ++c) {
diff --git a/tests/InfRectTest.cpp b/tests/InfRectTest.cpp
index 95ef4be..4d957dc 100644
--- a/tests/InfRectTest.cpp
+++ b/tests/InfRectTest.cpp
@@ -35,7 +35,7 @@
                         gData[index].fRect.centerY() == gData[index].fCenter.y());
     }
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 10000; ++i) {
         SkIRect r;
 
diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp
index 88fe11d..6b373e3 100644
--- a/tests/LListTest.cpp
+++ b/tests/LListTest.cpp
@@ -124,7 +124,7 @@
 static void TestTLList(skiatest::Reporter* reporter) {
     typedef SkTLList<ListElement> ElList;
     typedef ElList::Iter Iter;
-    SkMWCRandom random;
+    SkRandom random;
 
     for (int i = 1; i <= 16; i *= 2) {
 
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 5ec91a9..cb4d0b8 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -19,7 +19,7 @@
     REPORTER_ASSERT(reporter, 1 == SkCLZ(1 << 30));
     REPORTER_ASSERT(reporter, 0 == SkCLZ(~0U));
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 1000; ++i) {
         uint32_t mask = rand.nextU();
         // need to get some zeros for testing, but in some obscure way so the
@@ -82,7 +82,7 @@
     }
 #endif
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 10000; ++i) {
         unsigned a = rand.nextU() & 0x7FFF;
         unsigned b = rand.nextU() & 0x7FFF;
@@ -219,7 +219,7 @@
     REPORTER_ASSERT(reporter, len > 0.999f && len < 1.001f);
 }
 
-static float nextFloat(SkMWCRandom& rand) {
+static float nextFloat(SkRandom& rand) {
     SkFloatIntUnion data;
     data.fSignBitInt = rand.nextU();
     return data.fFloat;
@@ -293,7 +293,7 @@
 }
 
 static void unittest_fastfloat(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
     size_t i;
 
     static const float gFloats[] = {
@@ -414,7 +414,7 @@
         REPORTER_ASSERT(reporter, sk_float_copysign(x, y) == expected);
     }
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int j = 0; j < 1000; j++) {
         int ix = rand.nextS();
         REPORTER_ASSERT(reporter, SkCopySign32(ix, ix) == ix);
@@ -433,7 +433,7 @@
 static void TestMath(skiatest::Reporter* reporter) {
     int         i;
     int32_t     x;
-    SkMWCRandom    rand;
+    SkRandom    rand;
 
     // these should assert
 #if 0
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 0f4973f..d75de75 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -169,7 +169,7 @@
         bool invertable = mats[i].invert(&mats[i + SK_ARRAY_COUNT(baseMats)]);
         REPORTER_ASSERT(reporter, invertable);
     }
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int m = 0; m < 1000; ++m) {
         SkMatrix mat;
         mat.reset();
@@ -492,7 +492,7 @@
     REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2));
 
     // try some random matrices
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int m = 0; m < 1000; ++m) {
         SkScalar rot0 = rand.nextRangeF(-180, 180);
         SkScalar sx = rand.nextRangeF(-3000.f, 3000.f);
@@ -574,7 +574,7 @@
 
     const int kTripleCount = 1000;
     const int kMatrixCount = 1000;
-    SkMWCRandom rand;
+    SkRandom rand;
 
     SkScalar randTriples[3*kTripleCount];
     for (int i = 0; i < 3*kTripleCount; ++i) {
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp
index 5862d08..3988273 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -10,7 +10,7 @@
 #include "SkBitmap.h"
 #include "SkRandom.h"
 
-static void make_bitmap(SkBitmap* bm, SkMWCRandom& rand) {
+static void make_bitmap(SkBitmap* bm, SkRandom& rand) {
     // for now, Build needs a min size of 2, otherwise it will return NULL.
     // should fix that to support 1 X N, where N > 1 to return non-null.
     int w = 2 + rand.nextU() % 1000;
@@ -22,7 +22,7 @@
 
 static void TestMipMap(skiatest::Reporter* reporter) {
     SkBitmap bm;
-    SkMWCRandom rand;
+    SkRandom rand;
 
     for (int i = 0; i < 500; ++i) {
         make_bitmap(&bm, rand);
diff --git a/tests/PackBitsTest.cpp b/tests/PackBitsTest.cpp
index 59c8a8c..f7d4b8e 100644
--- a/tests/PackBitsTest.cpp
+++ b/tests/PackBitsTest.cpp
@@ -14,7 +14,7 @@
 static const uint16_t gTest3[] = { 0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 0, 0, 1 };
 
 #include "SkRandom.h"
-static SkMWCRandom gRand;
+static SkRandom gRand;
 static void rand_fill(uint16_t buffer[], int count) {
     for (int i = 0; i < count; i++)
         buffer[i] = (uint16_t)gRand.nextU();
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index c8d2bec..045c2d2 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -71,7 +71,7 @@
         { uni_to_utf32, SkPaint::kUTF32_TextEncoding },
     };
 
-    SkMWCRandom rand;
+    SkRandom rand;
     SkPaint paint;
     paint.setTypeface(SkTypeface::RefDefault())->unref();
     SkTypeface* face = paint.getTypeface();
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index ed80d41..080ce28 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -426,7 +426,7 @@
 // Note: PathBench::ArbRoundRectBench performs almost exactly
 // the same test (but with drawing)
 static void test_arb_round_rect_is_convex(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
     SkRect r;
 
     for (int i = 0; i < 5000; ++i) {
@@ -453,7 +453,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) {
-    SkMWCRandom rand;
+    SkRandom rand;
     SkRect r;
 
     for (int i = 0; i < 5000; ++i) {
@@ -592,7 +592,7 @@
 
 static void test_addPoly(skiatest::Reporter* reporter) {
     SkPoint pts[32];
-    SkMWCRandom rand;
+    SkRandom rand;
 
     for (size_t i = 0; i < SK_ARRAY_COUNT(pts); ++i) {
         pts[i].fX = rand.nextSScalar1();
@@ -2035,7 +2035,7 @@
     }
 
     // Max of 10 segments, max 3 points per segment
-    SkMWCRandom rand(9876543);
+    SkRandom rand(9876543);
     SkPoint          expectedPts[31]; // May have leading moveTo
     SkPath::Verb     expectedVerbs[22]; // May have leading moveTo
     SkPath::Verb     nextVerb;
diff --git a/tests/PathUtilsTest.cpp b/tests/PathUtilsTest.cpp
index 15f981b..fad5cae 100644
--- a/tests/PathUtilsTest.cpp
+++ b/tests/PathUtilsTest.cpp
@@ -17,7 +17,7 @@
 const int kNumIt = 100;
 
 static void fill_random_bits(int chars, char* bits){
-    SkMWCRandom rand(SkTime::GetMSecs());
+    SkRandom rand(SkTime::GetMSecs());
 
     for (int i = 0; i < chars; ++i){
         bits[i] = rand.nextU();
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 349560b..a42112d 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -75,7 +75,7 @@
     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 @@
         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 @@
 }
 #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 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);
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 666750b..a907d6d 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -23,7 +23,7 @@
     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 @@
     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 @@
     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 rtree_test_main(SkRTree* rtree, skiatest::Reporter* reporter) {
     DataRect rects[NUM_RECTS];
-    SkMWCRandom rand;
+    SkRandom rand;
     REPORTER_ASSERT(reporter, NULL != rtree);
 
     int expectedDepthMin = -1;
diff --git a/tests/RandomTest.cpp b/tests/RandomTest.cpp
index 51408e9..c9fee4a 100644
--- a/tests/RandomTest.cpp
+++ b/tests/RandomTest.cpp
@@ -61,7 +61,7 @@
     int bins[256];
     memset(bins, 0, sizeof(int)*256);
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 256*10000; ++i) {
         bins[(rand.nextU() >> shift) & 0xff]++;
     }
@@ -73,7 +73,7 @@
     int bins[256];
     memset(bins, 0, sizeof(int)*256);
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 256*10000; ++i) {
         float f = rand.nextF();
         REPORTER_ASSERT(reporter, 0.0f <= f && f < 1.0f);
@@ -108,7 +108,7 @@
     const int kNumEntries = kN >> 5;  // dividing by 32
     unsigned int entries[kNumEntries];
 
-    SkMWCRandom rand;
+    SkRandom rand;
     memset(entries, 0, sizeof(unsigned int)*kNumEntries);
     // pre-seed our string value
     int value = 0;
@@ -161,7 +161,7 @@
 }
 
 static void test_range(skiatest::Reporter* reporter) {
-    SkMWCRandom rand;
+    SkRandom rand;
 
     // just to make sure we don't crash in this case
     (void) rand.nextRangeU(0, 0xffffffff);
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index 1c06d7e..5d3946e 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -98,7 +98,7 @@
     H = 256
 };
 
-static SkIRect randRect(SkMWCRandom& rand) {
+static SkIRect randRect(SkRandom& rand) {
     int x = rand.nextU() % W;
     int y = rand.nextU() % H;
     int w = rand.nextU() % W;
@@ -106,7 +106,7 @@
     return SkIRect::MakeXYWH(x, y, w >> 1, h >> 1);
 }
 
-static void randRgn(SkMWCRandom& rand, SkRegion* rgn, int n) {
+static void randRgn(SkRandom& rand, SkRegion* rgn, int n) {
     rgn->setEmpty();
     for (int i = 0; i < n; ++i) {
         rgn->op(randRect(rand), SkRegion::kUnion_Op);
@@ -183,7 +183,7 @@
 static void test_proc(skiatest::Reporter* reporter,
                       void (*proc)(skiatest::Reporter*,
                                    const SkRegion& a, const SkRegion&)) {
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 10000; ++i) {
         SkRegion outer;
         randRgn(rand, &outer, 8);
@@ -193,7 +193,7 @@
     }
 }
 
-static void rand_rect(SkIRect* rect, SkMWCRandom& rand) {
+static void rand_rect(SkIRect* rect, SkRandom& rand) {
     int bits = 6;
     int shift = 32 - bits;
     rect->set(rand.nextU() >> shift, rand.nextU() >> shift,
@@ -237,7 +237,7 @@
     };
     REPORTER_ASSERT(reporter, test_rects(rects, SK_ARRAY_COUNT(rects)));
 
-    SkMWCRandom rand;
+    SkRandom rand;
     for (int i = 0; i < 1000; i++) {
         SkRegion rgn0, rgn1;
 
diff --git a/tests/Sk64Test.cpp b/tests/Sk64Test.cpp
index e956cbb..50b7ec7 100644
--- a/tests/Sk64Test.cpp
+++ b/tests/Sk64Test.cpp
@@ -75,7 +75,7 @@
 
     // Now test add/sub
 
-    SkMWCRandom    rand;
+    SkRandom    rand;
     int         i;
 
     for (i = 0; i < 1000; i++)
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp
index 6bfb300..28c6e68 100644
--- a/tests/SortTest.cpp
+++ b/tests/SortTest.cpp
@@ -15,7 +15,7 @@
     }
 }
 
-static void rand_array(SkMWCRandom& rand, int array[], int n) {
+static void rand_array(SkRandom& rand, int array[], int n) {
     for (int j = 0; j < n; j++) {
         array[j] = rand.nextS() & 0xFF;
     }
@@ -40,7 +40,7 @@
     /** The random numbers are copied into this array, sorted by an SkSort,
         then this array is compared against the reference sort. */
     int workingArray[SK_ARRAY_COUNT(randomArray)];
-    SkMWCRandom    rand;
+    SkRandom    rand;
 
     for (int i = 0; i < 10000; i++) {
         int count = rand.nextRangeU(1, SK_ARRAY_COUNT(randomArray));
diff --git a/tests/UtilsTest.cpp b/tests/UtilsTest.cpp
index 33d5c97..cb0668e 100644
--- a/tests/UtilsTest.cpp
+++ b/tests/UtilsTest.cpp
@@ -123,7 +123,7 @@
 
 static void test_search(skiatest::Reporter* reporter) {
     int         i, array[kSEARCH_COUNT];
-    SkMWCRandom    rand;
+    SkRandom    rand;
 
     for (i = 0; i < kSEARCH_COUNT; i++) {
         array[i] = rand.nextS();
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
index fd232fc..8b4aba5 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -153,7 +153,7 @@
 
     SkAutoMalloc originalData(dataSize);
     {
-        SkMWCRandom rand(0);
+        SkRandom rand(0);
         uint32_t* ptr = static_cast<uint32_t*>(originalData.get());
         uint32_t* stop = ptr + (dataSize>>2);
         while (ptr < stop) {