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

Side by Side Diff: src/effects/gradients/SkLinearGradient.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 "SkLinearGradient.h" 9 #include "SkLinearGradient.h"
10 10
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 : INHERITED(ctx, shader, matrix, tm) { } 490 : INHERITED(ctx, shader, matrix, tm) { }
491 GR_DECLARE_EFFECT_TEST; 491 GR_DECLARE_EFFECT_TEST;
492 492
493 typedef GrGradientEffect INHERITED; 493 typedef GrGradientEffect INHERITED;
494 }; 494 };
495 495
496 ///////////////////////////////////////////////////////////////////// 496 /////////////////////////////////////////////////////////////////////
497 497
498 GR_DEFINE_EFFECT_TEST(GrLinearGradient); 498 GR_DEFINE_EFFECT_TEST(GrLinearGradient);
499 499
500 GrEffectRef* GrLinearGradient::TestCreate(SkMWCRandom* random, 500 GrEffectRef* GrLinearGradient::TestCreate(SkRandom* random,
501 GrContext* context, 501 GrContext* context,
502 const GrDrawTargetCaps&, 502 const GrDrawTargetCaps&,
503 GrTexture**) { 503 GrTexture**) {
504 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, 504 SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()},
505 {random->nextUScalar1(), random->nextUScalar1()}}; 505 {random->nextUScalar1(), random->nextUScalar1()}};
506 506
507 SkColor colors[kMaxRandomGradientColors]; 507 SkColor colors[kMaxRandomGradientColors];
508 SkScalar stopsArray[kMaxRandomGradientColors]; 508 SkScalar stopsArray[kMaxRandomGradientColors];
509 SkScalar* stops = stopsArray; 509 SkScalar* stops = stopsArray;
510 SkShader::TileMode tm; 510 SkShader::TileMode tm;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 str->append("SkLinearGradient ("); 559 str->append("SkLinearGradient (");
560 560
561 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY); 561 str->appendf("start: (%f, %f)", fStart.fX, fStart.fY);
562 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY); 562 str->appendf(" end: (%f, %f) ", fEnd.fX, fEnd.fY);
563 563
564 this->INHERITED::toString(str); 564 this->INHERITED::toString(str);
565 565
566 str->append(")"); 566 str->append(")");
567 } 567 }
568 #endif 568 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698