Adds ability to draw rects using a unit square vertex buffer. Useful when matrix/uniform changes are less expensive than sending new verts. 

Adds optional matrix parameters to GrContext drawRect and drawRectToRect so that non-axis-aligned matrices can be drawn using these functions.

codereview Issue 4105049

git-svn-id: http://skia.googlecode.com/svn/trunk@749 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrDrawTarget.cpp b/gpu/src/GrDrawTarget.cpp
index 0101ecd..96afe2f 100644
--- a/gpu/src/GrDrawTarget.cpp
+++ b/gpu/src/GrDrawTarget.cpp
@@ -358,6 +358,16 @@
     fCurrDrawState.fTextureMatrices[stage] = m;
 }
 
+void GrDrawTarget::concatTextureMatrix(int stage, const GrMatrix& m) {
+    GrAssert(stage >= 0 && stage < kNumStages);
+    fCurrDrawState.fTextureMatrices[stage].preConcat(m);
+}
+
+const GrMatrix& GrDrawTarget::getTextureMatrix(int stage) const {
+    GrAssert(stage >= 0 && stage < kNumStages);
+    return fCurrDrawState.fTextureMatrices[stage];
+}
+
 void GrDrawTarget::setStencilPass(StencilPass pass) {
     fCurrDrawState.fStencilPass = pass;
 }