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

Unified Diff: samplecode/SamplePoints.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 | « samplecode/SamplePicture.cpp ('k') | samplecode/SampleRotateCircles.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePoints.cpp
diff --git a/samplecode/SamplePoints.cpp b/samplecode/SamplePoints.cpp
index 3bb8126f5725c6dfeec49351a652a58b2390284b..ac2f625f998005c58238b8af7038a776d2e7d08e 100644
--- a/samplecode/SamplePoints.cpp
+++ b/samplecode/SamplePoints.cpp
@@ -41,7 +41,7 @@ protected:
return this->INHERITED::onQuery(evt);
}
- static void fill_pts(SkPoint pts[], size_t n, SkMWCRandom* rand) {
+ static void fill_pts(SkPoint pts[], size_t n, SkRandom* rand) {
for (size_t i = 0; i < n; i++)
pts[i].set(rand->nextUScalar1() * 640, rand->nextUScalar1() * 480);
}
@@ -49,7 +49,7 @@ protected:
virtual void onDrawContent(SkCanvas* canvas) {
canvas->translate(SK_Scalar1, SK_Scalar1);
- SkMWCRandom rand;
+ SkRandom rand;
SkPaint p0, p1, p2, p3;
const size_t n = 99;
« no previous file with comments | « samplecode/SamplePicture.cpp ('k') | samplecode/SampleRotateCircles.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698