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

Side by Side Diff: samplecode/SampleRotateCircles.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/SamplePoints.cpp ('k') | samplecode/SampleSlides.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 20 matching lines...) Expand all
31 // overrides from SkEventSink 31 // overrides from SkEventSink
32 virtual bool onQuery(SkEvent* evt) { 32 virtual bool onQuery(SkEvent* evt) {
33 if (SampleCode::TitleQ(*evt)) { 33 if (SampleCode::TitleQ(*evt)) {
34 SampleCode::TitleR(evt, "RotateCircles"); 34 SampleCode::TitleR(evt, "RotateCircles");
35 return true; 35 return true;
36 } 36 }
37 return this->INHERITED::onQuery(evt); 37 return this->INHERITED::onQuery(evt);
38 } 38 }
39 39
40 virtual void onDrawContent(SkCanvas* canvas) { 40 virtual void onDrawContent(SkCanvas* canvas) {
41 SkMWCRandom rand; 41 SkRandom rand;
42 SkPaint paint; 42 SkPaint paint;
43 paint.setAntiAlias(true); 43 paint.setAntiAlias(true);
44 paint.setStrokeWidth(20); 44 paint.setStrokeWidth(20);
45 45
46 SkScalar cx = 240; 46 SkScalar cx = 240;
47 SkScalar cy = 240; 47 SkScalar cy = 240;
48 SkScalar DX = 240 * 2; 48 SkScalar DX = 240 * 2;
49 SkColor color = 0; 49 SkColor color = 0;
50 50
51 float scale = 1; 51 float scale = 1;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 }; 352 };
353 353
354 /////////////////////////////////////////////////////////////////////////////// 354 ///////////////////////////////////////////////////////////////////////////////
355 355
356 static SkView* F0() { return new RotateCirclesView; } 356 static SkView* F0() { return new RotateCirclesView; }
357 static SkViewRegister gR0(F0); 357 static SkViewRegister gR0(F0);
358 static SkView* F1() { return new TestCirclesView; } 358 static SkView* F1() { return new TestCirclesView; }
359 static SkViewRegister gR1(F1); 359 static SkViewRegister gR1(F1);
360 static SkView* F2() { return new TestStrokeView; } 360 static SkView* F2() { return new TestStrokeView; }
361 static SkViewRegister gR2(F2); 361 static SkViewRegister gR2(F2);
OLDNEW
« no previous file with comments | « samplecode/SamplePoints.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698