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

Side by Side Diff: bench/TextBench.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 | « bench/SortBench.cpp ('k') | bench/VertBench.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 "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkFontHost.h" 10 #include "SkFontHost.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (SK_ColorBLACK != fPaint.getColor()) { 87 if (SK_ColorBLACK != fPaint.getColor()) {
88 fName.appendf("_%02X", fPaint.getAlpha()); 88 fName.appendf("_%02X", fPaint.getAlpha());
89 } else { 89 } else {
90 fName.append("_BK"); 90 fName.append("_BK");
91 } 91 }
92 return fName.c_str(); 92 return fName.c_str();
93 } 93 }
94 94
95 virtual void onDraw(SkCanvas* canvas) { 95 virtual void onDraw(SkCanvas* canvas) {
96 const SkIPoint dim = this->getSize(); 96 const SkIPoint dim = this->getSize();
97 SkMWCRandom rand; 97 SkRandom rand;
98 98
99 SkPaint paint(fPaint); 99 SkPaint paint(fPaint);
100 this->setupPaint(&paint); 100 this->setupPaint(&paint);
101 // explicitly need these 101 // explicitly need these
102 paint.setColor(fPaint.getColor()); 102 paint.setColor(fPaint.getColor());
103 paint.setAntiAlias(kBW != fFQ); 103 paint.setAntiAlias(kBW != fFQ);
104 paint.setLCDRenderText(kLCD == fFQ); 104 paint.setLCDRenderText(kLCD == fFQ);
105 105
106 const SkScalar x0 = SkIntToScalar(-10); 106 const SkScalar x0 = SkIntToScalar(-10);
107 const SkScalar y0 = SkIntToScalar(-10); 107 const SkScalar y0 = SkIntToScalar(-10);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 static BenchRegistry gReg11(Fact11); 152 static BenchRegistry gReg11(Fact11);
153 static BenchRegistry gReg12(Fact12); 153 static BenchRegistry gReg12(Fact12);
154 static BenchRegistry gReg13(Fact13); 154 static BenchRegistry gReg13(Fact13);
155 155
156 static BenchRegistry gReg21(Fact21); 156 static BenchRegistry gReg21(Fact21);
157 static BenchRegistry gReg22(Fact22); 157 static BenchRegistry gReg22(Fact22);
158 static BenchRegistry gReg23(Fact23); 158 static BenchRegistry gReg23(Fact23);
159 159
160 static BenchRegistry gReg111(Fact111); 160 static BenchRegistry gReg111(Fact111);
OLDNEW
« no previous file with comments | « bench/SortBench.cpp ('k') | bench/VertBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698