Index: src/gpu/effects/GrDistanceFieldTextureEffect.cpp |
diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp |
index 669a504fb1fa3f311b3f66b15f5759adb31753f3..21fbb307c1eeeec8d66323abc7a5bf94c708dc97 100755 |
--- a/src/gpu/effects/GrDistanceFieldTextureEffect.cpp |
+++ b/src/gpu/effects/GrDistanceFieldTextureEffect.cpp |
@@ -53,9 +53,12 @@ public: |
this->setupColorPassThrough(pb, local.fInputColorType, args.fOutputColor, |
dfTexEffect.inColor(), &fColorUniform); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(pb); |
+ |
// setup position varying |
vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), |
- vsBuilder->uViewM(), dfTexEffect.inPosition()->fName); |
+ this->uViewM(), dfTexEffect.inPosition()->fName); |
// setup output coords |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->positionCoords(), |
@@ -150,6 +153,8 @@ public: |
} |
#endif |
+ this->setUniformViewMatrix(pdman, proc.viewMatrix()); |
+ |
const DistanceFieldBatchTracker& local = bt.cast<DistanceFieldBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |
@@ -343,9 +348,12 @@ public: |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->localCoords(), |
dfTexEffect.inPosition()->fName); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(pb); |
+ |
// setup position varying |
vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), |
- vsBuilder->uViewM(), dfTexEffect.inPosition()->fName); |
+ this->uViewM(), dfTexEffect.inPosition()->fName); |
const char* textureSizeUniName = NULL; |
fTextureSizeUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
@@ -410,6 +418,8 @@ public: |
SkIntToScalar(fTextureSize.height())); |
} |
+ this->setUniformViewMatrix(pdman, proc.viewMatrix()); |
+ |
const DistanceFieldNoGammaBatchTracker& local = bt.cast<DistanceFieldNoGammaBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |
@@ -573,9 +583,12 @@ public: |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->localCoords(), |
dfTexEffect.inPosition()->fName); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(pb); |
+ |
// setup position varying |
- vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), |
- vsBuilder->uViewM(), dfTexEffect.inPosition()->fName); |
+ vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), this->uViewM(), |
+ dfTexEffect.inPosition()->fName); |
const char* textureSizeUniName = NULL; |
// width, height, 1/(3*width) |
@@ -717,6 +730,8 @@ public: |
fTextColor = textColor; |
} |
+ this->setUniformViewMatrix(pdman, processor.viewMatrix()); |
+ |
const DistanceFieldLCDBatchTracker& local = bt.cast<DistanceFieldLCDBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |