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

Side by Side Diff: gm/complexclip2.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 | « gm/circles.cpp ('k') | gm/convexpaths.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 2011 Google Inc. 2 * Copyright 2011 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 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 SkRegion::Op ops[] = { 64 SkRegion::Op ops[] = {
65 SkRegion::kDifference_Op, 65 SkRegion::kDifference_Op,
66 SkRegion::kIntersect_Op, 66 SkRegion::kIntersect_Op,
67 SkRegion::kUnion_Op, 67 SkRegion::kUnion_Op,
68 SkRegion::kXOR_Op, 68 SkRegion::kXOR_Op,
69 SkRegion::kReverseDifference_Op, 69 SkRegion::kReverseDifference_Op,
70 SkRegion::kReplace_Op, 70 SkRegion::kReplace_Op,
71 }; 71 };
72 72
73 SkRandom r; 73 SkLCGRandom r;
74 for (int i = 0; i < kRows; ++i) { 74 for (int i = 0; i < kRows; ++i) {
75 for (int j = 0; j < kCols; ++j) { 75 for (int j = 0; j < kCols; ++j) {
76 for (int k = 0; k < 5; ++k) { 76 for (int k = 0; k < 5; ++k) {
77 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; 77 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)];
78 } 78 }
79 } 79 }
80 } 80 }
81 } 81 }
82 82
83 protected: 83 protected:
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // aa rects 174 // aa rects
175 static GM* MyFactory3(void*) { return new ComplexClip2GM(false, true); } 175 static GM* MyFactory3(void*) { return new ComplexClip2GM(false, true); }
176 static GMRegistry reg3(MyFactory3); 176 static GMRegistry reg3(MyFactory3);
177 177
178 // aa paths 178 // aa paths
179 static GM* MyFactory4(void*) { return new ComplexClip2GM(true, true); } 179 static GM* MyFactory4(void*) { return new ComplexClip2GM(true, true); }
180 static GMRegistry reg4(MyFactory4); 180 static GMRegistry reg4(MyFactory4);
181 181
182 } 182 }
OLDNEW
« no previous file with comments | « gm/circles.cpp ('k') | gm/convexpaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698