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

Side by Side Diff: src/effects/SkPerlinNoiseShader.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/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTableColorFilter.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 * 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 "SkDither.h" 8 #include "SkDither.h"
9 #include "SkPerlinNoiseShader.h" 9 #include "SkPerlinNoiseShader.h"
10 #include "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } 705 }
706 706
707 SkScalar fSeed; 707 SkScalar fSeed;
708 708
709 typedef GrNoiseEffect INHERITED; 709 typedef GrNoiseEffect INHERITED;
710 }; 710 };
711 711
712 ///////////////////////////////////////////////////////////////////// 712 /////////////////////////////////////////////////////////////////////
713 GR_DEFINE_EFFECT_TEST(GrPerlinNoiseEffect); 713 GR_DEFINE_EFFECT_TEST(GrPerlinNoiseEffect);
714 714
715 GrEffectRef* GrPerlinNoiseEffect::TestCreate(SkMWCRandom* random, 715 GrEffectRef* GrPerlinNoiseEffect::TestCreate(SkRandom* random,
716 GrContext* context, 716 GrContext* context,
717 const GrDrawTargetCaps&, 717 const GrDrawTargetCaps&,
718 GrTexture**) { 718 GrTexture**) {
719 int numOctaves = random->nextRangeU(2, 10); 719 int numOctaves = random->nextRangeU(2, 10);
720 bool stitchTiles = random->nextBool(); 720 bool stitchTiles = random->nextBool();
721 SkScalar seed = SkIntToScalar(random->nextU()); 721 SkScalar seed = SkIntToScalar(random->nextU());
722 SkISize tileSize = SkISize::Make(random->nextRangeU(4, 4096), random->nextR angeU(4, 4096)); 722 SkISize tileSize = SkISize::Make(random->nextRangeU(4, 4096), random->nextR angeU(4, 4096));
723 SkScalar baseFrequencyX = random->nextRangeScalar(SkFloatToScalar(0.01f), 723 SkScalar baseFrequencyX = random->nextRangeScalar(SkFloatToScalar(0.01f),
724 SkFloatToScalar(0.99f)); 724 SkFloatToScalar(0.99f));
725 SkScalar baseFrequencyY = random->nextRangeScalar(SkFloatToScalar(0.01f), 725 SkScalar baseFrequencyY = random->nextRangeScalar(SkFloatToScalar(0.01f),
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 str->append(" seed: "); 1369 str->append(" seed: ");
1370 str->appendScalar(fSeed); 1370 str->appendScalar(fSeed);
1371 str->append(" stitch tiles: "); 1371 str->append(" stitch tiles: ");
1372 str->append(fStitchTiles ? "true " : "false "); 1372 str->append(fStitchTiles ? "true " : "false ");
1373 1373
1374 this->INHERITED::toString(str); 1374 this->INHERITED::toString(str);
1375 1375
1376 str->append(")"); 1376 str->append(")");
1377 } 1377 }
1378 #endif 1378 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTableColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698