Index: src/gpu/GrGeometryProcessor.cpp |
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp |
index 01ea85a78b30d7db42124af5029727a9b474eb3a..b1400670f10c76d0162e15957a4593486e7ab498 100644 |
--- a/src/gpu/GrGeometryProcessor.cpp |
+++ b/src/gpu/GrGeometryProcessor.cpp |
@@ -56,6 +56,25 @@ void GrGLGeometryProcessor::setupColorPassThrough(GrGLGPBuilder* pb, |
} |
} |
+void GrGLGeometryProcessor::setupUniformViewMatrix(GrGLGPBuilder* pb) { |
bsalomon
2014/12/30 13:19:38
These functions are so similarly named. Maybe we c
|
+ fViewMatrixUniform = pb->addUniform(GrGLProgramBuilder::kVertex_Visibility, |
+ kMat33f_GrSLType, kDefault_GrSLPrecision, |
+ "uViewM", |
+ &fViewMatrixName); |
+} |
+ |
+void GrGLGeometryProcessor::setUniformViewMatrix(const GrGLProgramDataManager& pdman, |
+ const SkMatrix& viewMatrix) { |
+ if (!fViewMatrix.cheapEqualTo(viewMatrix)) { |
+ SkASSERT(fViewMatrixUniform.isValid()); |
+ fViewMatrix = viewMatrix; |
+ |
+ GrGLfloat viewMatrix[3 * 3]; |
+ GrGLGetMatrix<3>(viewMatrix, fViewMatrix); |
+ pdman.setMatrix3f(fViewMatrixUniform, viewMatrix); |
+ } |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
struct PathBatchTracker { |