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

Unified Diff: samplecode/SampleChart.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/SampleApp.cpp ('k') | samplecode/SampleClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleChart.cpp
diff --git a/samplecode/SampleChart.cpp b/samplecode/SampleChart.cpp
index 68d750f8816c3a8594cfdb2c0c2d56e3e22ad7f6..35f8206f76f2bd815a512db8a802428ff6033349 100644
--- a/samplecode/SampleChart.cpp
+++ b/samplecode/SampleChart.cpp
@@ -16,7 +16,7 @@ namespace {
// Generates y values for the chart plots.
void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* dataPts) {
dataPts->setCount(count);
- static SkMWCRandom gRandom;
+ static SkRandom gRandom;
for (int i = 0; i < count; ++i) {
(*dataPts)[i] = gRandom.nextRangeScalar(yAvg - SkScalarHalf(ySpread),
yAvg + SkScalarHalf(ySpread));
@@ -123,7 +123,7 @@ protected:
canvas->clear(0xFFE0F0E0);
- static SkMWCRandom colorRand;
+ static SkRandom colorRand;
static SkColor gColors[kNumGraphs] = { 0x0 };
if (0 == gColors[0]) {
for (int i = 0; i < kNumGraphs; ++i) {
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | samplecode/SampleClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698