Index: src/gpu/effects/GrBezierEffect.cpp |
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp |
index 4ab088c6a8ec497017095b6bf4afccd9776f00d6..e846b79b2512890cf9b2ce1c09ce15535759d437 100644 |
--- a/src/gpu/effects/GrBezierEffect.cpp |
+++ b/src/gpu/effects/GrBezierEffect.cpp |
@@ -32,8 +32,10 @@ public: |
GrProcessorKeyBuilder*); |
virtual void setData(const GrGLProgramDataManager& pdman, |
- const GrPrimitiveProcessor&, |
+ const GrPrimitiveProcessor& primProc, |
const GrBatchTracker& bt) SK_OVERRIDE { |
+ this->setUniformViewMatrix(pdman, primProc.viewMatrix()); |
+ |
const ConicBatchTracker& local = bt.cast<ConicBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |
@@ -82,8 +84,11 @@ void GrGLConicEffect::emitCode(const EmitArgs& args) { |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->positionCoords(), gp.inPosition()->fName); |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->localCoords(), gp.inPosition()->fName); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(pb); |
+ |
// setup position varying |
- vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), vsBuilder->uViewM(), |
+ vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), this->uViewM(), |
gp.inPosition()->fName); |
GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
@@ -261,8 +266,10 @@ public: |
GrProcessorKeyBuilder*); |
virtual void setData(const GrGLProgramDataManager& pdman, |
- const GrPrimitiveProcessor&, |
+ const GrPrimitiveProcessor& primProc, |
const GrBatchTracker& bt) SK_OVERRIDE { |
+ this->setUniformViewMatrix(pdman, primProc.viewMatrix()); |
+ |
const QuadBatchTracker& local = bt.cast<QuadBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |
@@ -311,8 +318,11 @@ void GrGLQuadEffect::emitCode(const EmitArgs& args) { |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->positionCoords(), gp.inPosition()->fName); |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->localCoords(), gp.inPosition()->fName); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(pb); |
+ |
// setup position varying |
- vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), vsBuilder->uViewM(), |
+ vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), this->uViewM(), |
gp.inPosition()->fName); |
GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
@@ -476,8 +486,10 @@ public: |
GrProcessorKeyBuilder*); |
virtual void setData(const GrGLProgramDataManager& pdman, |
- const GrPrimitiveProcessor&, |
+ const GrPrimitiveProcessor& primProc, |
const GrBatchTracker& bt) SK_OVERRIDE { |
+ this->setUniformViewMatrix(pdman, primProc.viewMatrix()); |
+ |
const CubicBatchTracker& local = bt.cast<CubicBatchTracker>(); |
if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { |
GrGLfloat c[4]; |
@@ -519,8 +531,11 @@ void GrGLCubicEffect::emitCode(const EmitArgs& args) { |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->positionCoords(), gp.inPosition()->fName); |
vsBuilder->codeAppendf("%s = %s;", vsBuilder->localCoords(), gp.inPosition()->fName); |
+ // setup uniform viewMatrix |
+ this->addUniformViewMatrix(args.fPB); |
+ |
// setup position varying |
- vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), vsBuilder->uViewM(), |
+ vsBuilder->codeAppendf("%s = %s * vec3(%s, 1);", vsBuilder->glPosition(), this->uViewM(), |
gp.inPosition()->fName); |
GrGLGPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |