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

Side by Side Diff: src/effects/gradients/SkSweepGradient.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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 8
9 #include "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) { } 440 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) { }
441 GR_DECLARE_EFFECT_TEST; 441 GR_DECLARE_EFFECT_TEST;
442 442
443 typedef GrGradientEffect INHERITED; 443 typedef GrGradientEffect INHERITED;
444 }; 444 };
445 445
446 ///////////////////////////////////////////////////////////////////// 446 /////////////////////////////////////////////////////////////////////
447 447
448 GR_DEFINE_EFFECT_TEST(GrSweepGradient); 448 GR_DEFINE_EFFECT_TEST(GrSweepGradient);
449 449
450 GrEffectRef* GrSweepGradient::TestCreate(SkMWCRandom* random, 450 GrEffectRef* GrSweepGradient::TestCreate(SkRandom* random,
451 GrContext* context, 451 GrContext* context,
452 const GrDrawTargetCaps&, 452 const GrDrawTargetCaps&,
453 GrTexture**) { 453 GrTexture**) {
454 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()}; 454 SkPoint center = {random->nextUScalar1(), random->nextUScalar1()};
455 455
456 SkColor colors[kMaxRandomGradientColors]; 456 SkColor colors[kMaxRandomGradientColors];
457 SkScalar stopsArray[kMaxRandomGradientColors]; 457 SkScalar stopsArray[kMaxRandomGradientColors];
458 SkScalar* stops = stopsArray; 458 SkScalar* stops = stopsArray;
459 SkShader::TileMode tmIgnored; 459 SkShader::TileMode tmIgnored;
460 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored); 460 int colorCount = RandomGradientParams(random, colors, &stops, &tmIgnored);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 str->appendScalar(fCenter.fX); 508 str->appendScalar(fCenter.fX);
509 str->append(", "); 509 str->append(", ");
510 str->appendScalar(fCenter.fY); 510 str->appendScalar(fCenter.fY);
511 str->append(") "); 511 str->append(") ");
512 512
513 this->INHERITED::toString(str); 513 this->INHERITED::toString(str);
514 514
515 str->append(")"); 515 str->append(")");
516 } 516 }
517 #endif 517 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698