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

Side by Side Diff: src/gpu/GrOvalRenderer.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 | « src/gpu/GrEffect.cpp ('k') | src/gpu/GrRedBlackTree.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 bool fStroke; 149 bool fStroke;
150 150
151 GR_DECLARE_EFFECT_TEST; 151 GR_DECLARE_EFFECT_TEST;
152 152
153 typedef GrEffect INHERITED; 153 typedef GrEffect INHERITED;
154 }; 154 };
155 155
156 GR_DEFINE_EFFECT_TEST(CircleEdgeEffect); 156 GR_DEFINE_EFFECT_TEST(CircleEdgeEffect);
157 157
158 GrEffectRef* CircleEdgeEffect::TestCreate(SkMWCRandom* random, 158 GrEffectRef* CircleEdgeEffect::TestCreate(SkRandom* random,
159 GrContext* context, 159 GrContext* context,
160 const GrDrawTargetCaps&, 160 const GrDrawTargetCaps&,
161 GrTexture* textures[]) { 161 GrTexture* textures[]) {
162 return CircleEdgeEffect::Create(random->nextBool()); 162 return CircleEdgeEffect::Create(random->nextBool());
163 } 163 }
164 164
165 /////////////////////////////////////////////////////////////////////////////// 165 ///////////////////////////////////////////////////////////////////////////////
166 166
167 /** 167 /**
168 * The output of this effect is a modulation of the input color and coverage for an axis-aligned 168 * The output of this effect is a modulation of the input color and coverage for an axis-aligned
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 bool fStroke; 287 bool fStroke;
288 288
289 GR_DECLARE_EFFECT_TEST; 289 GR_DECLARE_EFFECT_TEST;
290 290
291 typedef GrEffect INHERITED; 291 typedef GrEffect INHERITED;
292 }; 292 };
293 293
294 GR_DEFINE_EFFECT_TEST(EllipseEdgeEffect); 294 GR_DEFINE_EFFECT_TEST(EllipseEdgeEffect);
295 295
296 GrEffectRef* EllipseEdgeEffect::TestCreate(SkMWCRandom* random, 296 GrEffectRef* EllipseEdgeEffect::TestCreate(SkRandom* random,
297 GrContext* context, 297 GrContext* context,
298 const GrDrawTargetCaps&, 298 const GrDrawTargetCaps&,
299 GrTexture* textures[]) { 299 GrTexture* textures[]) {
300 return EllipseEdgeEffect::Create(random->nextBool()); 300 return EllipseEdgeEffect::Create(random->nextBool());
301 } 301 }
302 302
303 /////////////////////////////////////////////////////////////////////////////// 303 ///////////////////////////////////////////////////////////////////////////////
304 304
305 /** 305 /**
306 * The output of this effect is a modulation of the input color and coverage for an ellipse, 306 * The output of this effect is a modulation of the input color and coverage for an ellipse,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 Mode fMode; 448 Mode fMode;
449 449
450 GR_DECLARE_EFFECT_TEST; 450 GR_DECLARE_EFFECT_TEST;
451 451
452 typedef GrEffect INHERITED; 452 typedef GrEffect INHERITED;
453 }; 453 };
454 454
455 GR_DEFINE_EFFECT_TEST(DIEllipseEdgeEffect); 455 GR_DEFINE_EFFECT_TEST(DIEllipseEdgeEffect);
456 456
457 GrEffectRef* DIEllipseEdgeEffect::TestCreate(SkMWCRandom* random, 457 GrEffectRef* DIEllipseEdgeEffect::TestCreate(SkRandom* random,
458 GrContext* context, 458 GrContext* context,
459 const GrDrawTargetCaps&, 459 const GrDrawTargetCaps&,
460 GrTexture* textures[]) { 460 GrTexture* textures[]) {
461 return DIEllipseEdgeEffect::Create((Mode)(random->nextRangeU(0,2))); 461 return DIEllipseEdgeEffect::Create((Mode)(random->nextRangeU(0,2)));
462 } 462 }
463 463
464 /////////////////////////////////////////////////////////////////////////////// 464 ///////////////////////////////////////////////////////////////////////////////
465 465
466 void GrOvalRenderer::reset() { 466 void GrOvalRenderer::reset() {
467 SkSafeSetNull(fRRectIndexBuffer); 467 SkSafeSetNull(fRRectIndexBuffer);
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1141 }
1142 1142
1143 // drop out the middle quad if we're stroked 1143 // drop out the middle quad if we're stroked
1144 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices); 1144 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices);
1145 target->setIndexSourceToBuffer(indexBuffer); 1145 target->setIndexSourceToBuffer(indexBuffer);
1146 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds); 1146 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds);
1147 } 1147 }
1148 1148
1149 return true; 1149 return true;
1150 } 1150 }
OLDNEW
« no previous file with comments | « src/gpu/GrEffect.cpp ('k') | src/gpu/GrRedBlackTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698