re-land of skslc type constructor cleanups
BUG=skia:
Change-Id: I953be07e2389dd4a9e7dcce0ddfd7505b309bda1
Reviewed-on: https://skia-review.googlesource.com/8265
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
index 0d5ed93..87df896 100644
--- a/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryProcessor.cpp
@@ -108,7 +108,7 @@
&viewMatrixName);
if (!mat.hasPerspective()) {
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
- vertBuilder->codeAppendf("vec2 %s = vec2(%s * vec3(%s, 1));",
+ vertBuilder->codeAppendf("vec2 %s = (%s * vec3(%s, 1)).xy;",
gpArgs->fPositionVar.c_str(), viewMatrixName, posName);
} else {
gpArgs->fPositionVar.set(kVec3f_GrSLType, "pos3");