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

Unified Diff: samplecode/SampleCull.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/SampleClip.cpp ('k') | samplecode/SampleEmptyPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleCull.cpp
diff --git a/samplecode/SampleCull.cpp b/samplecode/SampleCull.cpp
index e6b110a96ad4858066f1e89d5209f71bb23bb619..18f2d0cc409293f4eddfa80f6d618ca114cf1ed9 100644
--- a/samplecode/SampleCull.cpp
+++ b/samplecode/SampleCull.cpp
@@ -96,7 +96,7 @@ FINISHED2:
return array;
}
-static SkScalar nextScalarRange(SkMWCRandom& rand, SkScalar min, SkScalar max) {
+static SkScalar nextScalarRange(SkRandom& rand, SkScalar min, SkScalar max) {
return min + SkScalarMul(rand.nextUScalar1(), max - min);
}
@@ -105,7 +105,7 @@ public:
CullView() {
fClip.set(0, 0, SkIntToScalar(160), SkIntToScalar(160));
- SkMWCRandom rand;
+ SkRandom rand;
for (int i = 0; i < 50; i++) {
SkScalar x = nextScalarRange(rand, -fClip.width()*1, fClip.width()*2);
« no previous file with comments | « samplecode/SampleClip.cpp ('k') | samplecode/SampleEmptyPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698