Add getGLMatrix method to MatrixState

Removes redundant code by consolidating it into a single method. No
change in functionality, this is strictly a refactoring.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://chromiumcodereview.appspot.com/23767005

git-svn-id: http://skia.googlecode.com/svn/trunk@11112 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index 9a82b0b..686943b 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -11,6 +11,8 @@
 #include "gl/GrGLInterface.h"
 #include "GrGLDefines.h"
 
+class SkMatrix;
+
 ////////////////////////////////////////////////////////////////////////////////
 
 typedef uint32_t GrGLVersion;
@@ -91,6 +93,11 @@
 
 void GrGLClearErr(const GrGLInterface* gl);
 
+/**
+ * Helper for converting SkMatrix to a column-major GL float array
+ */
+template<int MatrixSize> void GrGLGetMatrix(GrGLfloat* dest, const SkMatrix& src);
+
 ////////////////////////////////////////////////////////////////////////////////
 
 /**