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

Unified Diff: gm/circles.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/beziers.cpp ('k') | gm/complexclip2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/circles.cpp
diff --git a/gm/circles.cpp b/gm/circles.cpp
index 2c9368be92fc7b01eb6f67e89eace17c7162c4f7..6fa682c26605229041de9eb11bb400408a57f47f 100644
--- a/gm/circles.cpp
+++ b/gm/circles.cpp
@@ -156,7 +156,6 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
- SkLCGRandom rand;
// Draw a giant AA circle as the background.
SkISize size = this->getISize();
SkScalar giantRadius = SkTMin(SkIntToScalar(size.fWidth),
@@ -168,6 +167,7 @@ protected:
giantPaint.setColor(0x80808080);
canvas->drawCircle(giantCenter.fX, giantCenter.fY, giantRadius, giantPaint);
+ SkRandom rand;
canvas->translate(20 * SK_Scalar1, 20 * SK_Scalar1);
int i;
for (i = 0; i < fPaints.count(); ++i) {
« no previous file with comments | « gm/beziers.cpp ('k') | gm/complexclip2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698