Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index fe918581c421b09ddc3fbe5a0465b60d3c25bce9..3370a76495c17d4dd28ecd48a584401c0ef9dfa7 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -19,8 +19,8 @@ |
#include "effects/GrTextureDomain.h" |
#include "glsl/GrGLSLFragmentProcessor.h" |
#include "glsl/GrGLSLFragmentShaderBuilder.h" |
-#include "glsl/GrGLSLProgramBuilder.h" |
#include "glsl/GrGLSLProgramDataManager.h" |
+#include "glsl/GrGLSLUniformHandler.h" |
#endif |
namespace { |
@@ -549,9 +549,9 @@ GrGLDisplacementMapEffect::~GrGLDisplacementMapEffect() { |
void GrGLDisplacementMapEffect::emitCode(EmitArgs& args) { |
const GrTextureDomain& domain = args.fFp.cast<GrDisplacementMapEffect>().domain(); |
- fScaleUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility, |
- kVec2f_GrSLType, kDefault_GrSLPrecision, "Scale"); |
- const char* scaleUni = args.fBuilder->getUniformCStr(fScaleUni); |
+ fScaleUni = args.fUniformHandler->addUniform(GrGLSLUniformHandler::kFragment_Visibility, |
+ kVec2f_GrSLType, kDefault_GrSLPrecision, "Scale"); |
+ const char* scaleUni = args.fUniformHandler->getUniformCStr(fScaleUni); |
const char* dColor = "dColor"; |
const char* cCoords = "cCoords"; |
const char* nearZero = "1e-6"; // Since 6.10352e−5 is the smallest half float, use |
@@ -610,6 +610,7 @@ void GrGLDisplacementMapEffect::emitCode(EmitArgs& args) { |
fragBuilder->codeAppend("-vec2(0.5));\t\t"); |
fGLDomain.sampleTexture(fragBuilder, |
+ args.fUniformHandler, |
args.fGLSLCaps, |
domain, |
args.fOutputColor, |