From f9d610179d7d4198b57b12d06f8d1ca09f580df3 Mon Sep 17 00:00:00 2001 From: scroggo Date: Mon, 15 Dec 2014 12:54:51 -0800 Subject: There can be only one (SkRandom)! Remove SkLCGRandom. We already decided the new one was better, which is why we wrote the new SkRandom. Convert GMs that were using SkLCGRandom to use the improved SkRandom. Motivated by the fact that these GMs draw differently on some runs. We believe this to be a result of using the old SkLCGRandom. Add each of the tests that were using SkLCGRandom to ignore-tests.txt, since we expect they'll draw differently using SkRandom. Move a trimmed down version of SkLCGRandom into SkDiscretePathEffect. In order to preserve the old behavior, trim down SkLCGRandom to only the methods used by SkDiscretePathEffect, and hide it in SkDiscretePathEffect's cpp file. BUG=skia:3241 Review URL: https://codereview.chromium.org/805963002 --- gm/strokerects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gm/strokerects.cpp') diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp index f3445cc35d..65eadd1a90 100644 --- a/gm/strokerects.cpp +++ b/gm/strokerects.cpp @@ -37,7 +37,7 @@ protected: return SkISize::Make(W*2, H*2); } - static void rnd_rect(SkRect* r, SkLCGRandom& rand) { + static void rnd_rect(SkRect* r, SkRandom& rand) { SkScalar x = rand.nextUScalar1() * W; SkScalar y = rand.nextUScalar1() * H; SkScalar w = rand.nextUScalar1() * (W >> 2); @@ -65,7 +65,7 @@ protected: , SW - SkIntToScalar(2), SH - SkIntToScalar(2) )); - SkLCGRandom rand; + SkRandom rand; for (int i = 0; i < N; i++) { SkRect r; rnd_rect(&r, rand); -- cgit v1.2.3