Index: src/effects/SkPerlinNoiseShader.cpp |
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp |
index 916cf78f0df5366fbf8404c07fe3d8cb01547052..51d84989a8cc72d543a1f126400974b319e54dc1 100644 |
--- a/src/effects/SkPerlinNoiseShader.cpp |
+++ b/src/effects/SkPerlinNoiseShader.cpp |
@@ -22,8 +22,8 @@ |
#include "effects/GrConstColorProcessor.h" |
#include "glsl/GrGLSLFragmentProcessor.h" |
#include "glsl/GrGLSLFragmentShaderBuilder.h" |
-#include "glsl/GrGLSLProgramBuilder.h" |
#include "glsl/GrGLSLProgramDataManager.h" |
+#include "glsl/GrGLSLUniformHandler.h" |
#endif |
static const int kBlockSize = 256; |
@@ -621,19 +621,20 @@ GrGLPerlinNoise::GrGLPerlinNoise(const GrProcessor& processor) |
void GrGLPerlinNoise::emitCode(EmitArgs& args) { |
GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder; |
+ GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; |
SkString vCoords = fragBuilder->ensureFSCoords2D(args.fCoords, 0); |
- fBaseFrequencyUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility, |
- kVec2f_GrSLType, kDefault_GrSLPrecision, |
- "baseFrequency"); |
- const char* baseFrequencyUni = args.fBuilder->getUniformCStr(fBaseFrequencyUni); |
+ fBaseFrequencyUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility, |
+ kVec2f_GrSLType, kDefault_GrSLPrecision, |
+ "baseFrequency"); |
+ const char* baseFrequencyUni = uniformHandler->getUniformCStr(fBaseFrequencyUni); |
const char* stitchDataUni = nullptr; |
if (fStitchTiles) { |
- fStitchDataUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility, |
- kVec2f_GrSLType, kDefault_GrSLPrecision, |
- "stitchData"); |
- stitchDataUni = args.fBuilder->getUniformCStr(fStitchDataUni); |
+ fStitchDataUni = uniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility, |
+ kVec2f_GrSLType, kDefault_GrSLPrecision, |
+ "stitchData"); |
+ stitchDataUni = uniformHandler->getUniformCStr(fStitchDataUni); |
} |
// There are 4 lines, so the center of each line is 1/8, 3/8, 5/8 and 7/8 |