Index: src/gpu/gl/GrGLGeometryProcessor.cpp |
diff --git a/src/gpu/gl/GrGLGeometryProcessor.cpp b/src/gpu/gl/GrGLGeometryProcessor.cpp |
index a8d020a166fc4c2f941a14ec5cd72e79feff175d..79bcb4c084b2023cc7e1500d128c568fc725421c 100644 |
--- a/src/gpu/gl/GrGLGeometryProcessor.cpp |
+++ b/src/gpu/gl/GrGLGeometryProcessor.cpp |
@@ -106,24 +106,26 @@ GrGLGeometryProcessor::setTransformData(const GrPrimitiveProcessor& primProc, |
} |
} |
-void GrGLGeometryProcessor::SetupPosition(GrGLVertexBuilder* vsBuilder, |
+void GrGLGeometryProcessor::setupPosition(GrGLGPBuilder* pb, |
GrGPArgs* gpArgs, |
const char* posName, |
- const SkMatrix& mat, |
- const char* matName) { |
+ const SkMatrix& mat) { |
+ GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder(); |
if (mat.isIdentity()) { |
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2"); |
vsBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName); |
} else if (!mat.hasPerspective()) { |
+ this->addUniformViewMatrix(pb); |
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2"); |
vsBuilder->codeAppendf("vec2 %s = vec2(%s * vec3(%s, 1));", |
- gpArgs->fPositionVar.c_str(), matName, posName); |
+ gpArgs->fPositionVar.c_str(), this->uViewM(), posName); |
} else { |
+ this->addUniformViewMatrix(pb); |
gpArgs->fPositionVar.set(kVec3f_GrSLType, "pos3"); |
vsBuilder->codeAppendf("vec3 %s = %s * vec3(%s, 1);", |
- gpArgs->fPositionVar.c_str(), matName, posName); |
+ gpArgs->fPositionVar.c_str(), this->uViewM(), posName); |
} |
} |