Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.cpp

Issue 920933002: fix for uniform view matrix being uploaded but not used (Closed) Base URL: https://skia.googlesource.com/skia.git@gp_cleanup_1
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLPrimitiveProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLPrimitiveProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698