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

Side by Side Diff: gm/degeneratesegments.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/cubicpaths.cpp ('k') | gm/emptypath.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 #include "gm.h" 7 #include "gm.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 titlePaint.setLCDRenderText(true); 290 titlePaint.setLCDRenderText(true);
291 titlePaint.setTextSize(15 * SK_Scalar1); 291 titlePaint.setTextSize(15 * SK_Scalar1);
292 const char title[] = "Random Paths Drawn Into Rectangle Clips With " 292 const char title[] = "Random Paths Drawn Into Rectangle Clips With "
293 "Indicated Style, Fill and Linecaps, " 293 "Indicated Style, Fill and Linecaps, "
294 "with Stroke width 6"; 294 "with Stroke width 6";
295 canvas->drawText(title, strlen(title), 295 canvas->drawText(title, strlen(title),
296 20 * SK_Scalar1, 296 20 * SK_Scalar1,
297 20 * SK_Scalar1, 297 20 * SK_Scalar1,
298 titlePaint); 298 titlePaint);
299 299
300 SkRandom rand; 300 SkLCGRandom rand;
301 SkRect rect = SkRect::MakeWH(220*SK_Scalar1, 50*SK_Scalar1); 301 SkRect rect = SkRect::MakeWH(220*SK_Scalar1, 50*SK_Scalar1);
302 canvas->save(); 302 canvas->save();
303 canvas->translate(2*SK_Scalar1, 30 * SK_Scalar1); // The title 303 canvas->translate(2*SK_Scalar1, 30 * SK_Scalar1); // The title
304 canvas->save(); 304 canvas->save();
305 unsigned numSegments = SK_ARRAY_COUNT(gSegmentFunctions); 305 unsigned numSegments = SK_ARRAY_COUNT(gSegmentFunctions);
306 unsigned numCaps = SK_ARRAY_COUNT(gCaps); 306 unsigned numCaps = SK_ARRAY_COUNT(gCaps);
307 unsigned numStyles = SK_ARRAY_COUNT(gStyles); 307 unsigned numStyles = SK_ARRAY_COUNT(gStyles);
308 unsigned numFills = SK_ARRAY_COUNT(gFills); 308 unsigned numFills = SK_ARRAY_COUNT(gFills);
309 for (size_t row = 0; row < 6; ++row) { 309 for (size_t row = 0; row < 6; ++row) {
310 if (0 < row) { 310 if (0 < row) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 private: 391 private:
392 typedef GM INHERITED; 392 typedef GM INHERITED;
393 }; 393 };
394 394
395 ////////////////////////////////////////////////////////////////////////////// 395 //////////////////////////////////////////////////////////////////////////////
396 396
397 static GM* MyFactory(void*) { return new DegenerateSegmentsGM; } 397 static GM* MyFactory(void*) { return new DegenerateSegmentsGM; }
398 static GMRegistry reg(MyFactory); 398 static GMRegistry reg(MyFactory);
399 399
400 } 400 }
OLDNEW
« no previous file with comments | « gm/cubicpaths.cpp ('k') | gm/emptypath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698