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

Unified Diff: gm/strokerects.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 | « gm/quadpaths.cpp ('k') | gm/strokes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/strokerects.cpp
diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp
index f3445cc35d0fc2ba386b9a8430a98e054155e13f..65eadd1a90c874a89a9ea973069f2636b47de495 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);
« no previous file with comments | « gm/quadpaths.cpp ('k') | gm/strokes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698