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

Side by Side Diff: samplecode/SampleManyRects.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleHairCurves.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 canvas->clipRect(clipRect); 62 canvas->clipRect(clipRect);
63 SkPaint paint; 63 SkPaint paint;
64 paint.setColor(fRandom.nextU()); 64 paint.setColor(fRandom.nextU());
65 canvas->drawRect(rect, paint); 65 canvas->drawRect(rect, paint);
66 canvas->restore(); 66 canvas->restore();
67 } 67 }
68 this->inval(NULL); 68 this->inval(NULL);
69 } 69 }
70 70
71 private: 71 private:
72 SkMWCRandom fRandom; 72 SkRandom fRandom;
73 typedef SampleView INHERITED; 73 typedef SampleView INHERITED;
74 }; 74 };
75 75
76 ////////////////////////////////////////////////////////////////////////////// 76 //////////////////////////////////////////////////////////////////////////////
77 77
78 static SkView* MyFactory() { return new ManyRectsView; } 78 static SkView* MyFactory() { return new ManyRectsView; }
79 static SkViewRegister reg(MyFactory); 79 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleHairCurves.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698