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

Side by Side Diff: gm/emptypath.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/degeneratesegments.cpp ('k') | gm/getpostextpath.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 2011 Google Inc. 3 * Copyright 2011 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 "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 titlePaint.setAntiAlias(true); 65 titlePaint.setAntiAlias(true);
66 titlePaint.setLCDRenderText(true); 66 titlePaint.setLCDRenderText(true);
67 titlePaint.setTextSize(15 * SK_Scalar1); 67 titlePaint.setTextSize(15 * SK_Scalar1);
68 const char title[] = "Empty Paths Drawn Into Rectangle Clips With " 68 const char title[] = "Empty Paths Drawn Into Rectangle Clips With "
69 "Indicated Style and Fill"; 69 "Indicated Style and Fill";
70 canvas->drawText(title, strlen(title), 70 canvas->drawText(title, strlen(title),
71 20 * SK_Scalar1, 71 20 * SK_Scalar1,
72 20 * SK_Scalar1, 72 20 * SK_Scalar1,
73 titlePaint); 73 titlePaint);
74 74
75 SkRandom rand; 75 SkLCGRandom rand;
76 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); 76 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1);
77 int i = 0; 77 int i = 0;
78 canvas->save(); 78 canvas->save();
79 canvas->translate(10 * SK_Scalar1, 0); 79 canvas->translate(10 * SK_Scalar1, 0);
80 canvas->save(); 80 canvas->save();
81 for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) { 81 for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) {
82 for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) { 82 for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) {
83 if (0 == i % 4) { 83 if (0 == i % 4) {
84 canvas->restore(); 84 canvas->restore();
85 canvas->translate(0, rect.height() + 40 * SK_Scalar1); 85 canvas->translate(0, rect.height() + 40 * SK_Scalar1);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 private: 124 private:
125 typedef GM INHERITED; 125 typedef GM INHERITED;
126 }; 126 };
127 127
128 ////////////////////////////////////////////////////////////////////////////// 128 //////////////////////////////////////////////////////////////////////////////
129 129
130 static GM* MyFactory(void*) { return new EmptyPathGM; } 130 static GM* MyFactory(void*) { return new EmptyPathGM; }
131 static GMRegistry reg(MyFactory); 131 static GMRegistry reg(MyFactory);
132 132
133 } 133 }
OLDNEW
« no previous file with comments | « gm/degeneratesegments.cpp ('k') | gm/getpostextpath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698