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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 } | 640 } |
641 | 641 |
642 void GrGLPerlinNoise::emitCode(GrGLFPBuilder* builder, | 642 void GrGLPerlinNoise::emitCode(GrGLFPBuilder* builder, |
643 const GrFragmentProcessor&, | 643 const GrFragmentProcessor&, |
644 const char* outputColor, | 644 const char* outputColor, |
645 const char* inputColor, | 645 const char* inputColor, |
646 const TransformedCoordsArray& coords, | 646 const TransformedCoordsArray& coords, |
647 const TextureSamplerArray& samplers) { | 647 const TextureSamplerArray& samplers) { |
648 sk_ignore_unused_variable(inputColor); | 648 sk_ignore_unused_variable(inputColor); |
649 | 649 |
650 GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); | 650 GrGLFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder(); |
651 SkString vCoords = fsBuilder->ensureFSCoords2D(coords, 0); | 651 SkString vCoords = fsBuilder->ensureFSCoords2D(coords, 0); |
652 | 652 |
653 fBaseFrequencyUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibi
lity, | 653 fBaseFrequencyUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibi
lity, |
654 kVec2f_GrSLType, kDefault_GrSLPrecis
ion, | 654 kVec2f_GrSLType, kDefault_GrSLPrecis
ion, |
655 "baseFrequency"); | 655 "baseFrequency"); |
656 const char* baseFrequencyUni = builder->getUniformCStr(fBaseFrequencyUni); | 656 const char* baseFrequencyUni = builder->getUniformCStr(fBaseFrequencyUni); |
657 fAlphaUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, | 657 fAlphaUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
658 kFloat_GrSLType, kDefault_GrSLPrecision, | 658 kFloat_GrSLType, kDefault_GrSLPrecision, |
659 "alpha"); | 659 "alpha"); |
660 const char* alphaUni = builder->getUniformCStr(fAlphaUni); | 660 const char* alphaUni = builder->getUniformCStr(fAlphaUni); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 str->append(" seed: "); | 1032 str->append(" seed: "); |
1033 str->appendScalar(fSeed); | 1033 str->appendScalar(fSeed); |
1034 str->append(" stitch tiles: "); | 1034 str->append(" stitch tiles: "); |
1035 str->append(fStitchTiles ? "true " : "false "); | 1035 str->append(fStitchTiles ? "true " : "false "); |
1036 | 1036 |
1037 this->INHERITED::toString(str); | 1037 this->INHERITED::toString(str); |
1038 | 1038 |
1039 str->append(")"); | 1039 str->append(")"); |
1040 } | 1040 } |
1041 #endif | 1041 #endif |
OLD | NEW |