OLD | NEW |
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 "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 | 595 |
596 private: | 596 private: |
597 typedef GrFragmentProcessor INHERITED; | 597 typedef GrFragmentProcessor INHERITED; |
598 }; | 598 }; |
599 | 599 |
600 ///////////////////////////////////////////////////////////////////// | 600 ///////////////////////////////////////////////////////////////////// |
601 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrPerlinNoiseEffect); | 601 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrPerlinNoiseEffect); |
602 | 602 |
603 GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(SkRandom* random, | 603 GrFragmentProcessor* GrPerlinNoiseEffect::TestCreate(SkRandom* random, |
604 GrContext* context, | 604 GrContext* context, |
605 const GrDrawTargetCaps&, | 605 const GrCaps&, |
606 GrTexture**) { | 606 GrTexture**) { |
607 int numOctaves = random->nextRangeU(2, 10); | 607 int numOctaves = random->nextRangeU(2, 10); |
608 bool stitchTiles = random->nextBool(); | 608 bool stitchTiles = random->nextBool(); |
609 SkScalar seed = SkIntToScalar(random->nextU()); | 609 SkScalar seed = SkIntToScalar(random->nextU()); |
610 SkISize tileSize = SkISize::Make(random->nextRangeU(4, 4096), random->nextR
angeU(4, 4096)); | 610 SkISize tileSize = SkISize::Make(random->nextRangeU(4, 4096), random->nextR
angeU(4, 4096)); |
611 SkScalar baseFrequencyX = random->nextRangeScalar(0.01f, | 611 SkScalar baseFrequencyX = random->nextRangeScalar(0.01f, |
612 0.99f); | 612 0.99f); |
613 SkScalar baseFrequencyY = random->nextRangeScalar(0.01f, | 613 SkScalar baseFrequencyY = random->nextRangeScalar(0.01f, |
614 0.99f); | 614 0.99f); |
615 | 615 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 str->append(" seed: "); | 1030 str->append(" seed: "); |
1031 str->appendScalar(fSeed); | 1031 str->appendScalar(fSeed); |
1032 str->append(" stitch tiles: "); | 1032 str->append(" stitch tiles: "); |
1033 str->append(fStitchTiles ? "true " : "false "); | 1033 str->append(fStitchTiles ? "true " : "false "); |
1034 | 1034 |
1035 this->INHERITED::toString(str); | 1035 this->INHERITED::toString(str); |
1036 | 1036 |
1037 str->append(")"); | 1037 str->append(")"); |
1038 } | 1038 } |
1039 #endif | 1039 #endif |
OLD | NEW |