Add SkMatrix44::setTranspose

It turned out that adding getDouble(...) and setDouble(...) made this change
easier, so I've included that in this cl as well.

Review URL: https://codereview.appspot.com/6845048

git-svn-id: http://skia.googlecode.com/svn/trunk@6424 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/SkMatrix44.cpp b/src/utils/SkMatrix44.cpp
index abef0b3..0e7ad16 100644
--- a/src/utils/SkMatrix44.cpp
+++ b/src/utils/SkMatrix44.cpp
@@ -323,6 +323,17 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
+void SkMatrix44::transpose() {
+    SkTSwap(fMat[0][1], fMat[1][0]);
+    SkTSwap(fMat[0][2], fMat[2][0]);
+    SkTSwap(fMat[0][3], fMat[3][0]);
+    SkTSwap(fMat[1][2], fMat[2][1]);
+    SkTSwap(fMat[1][3], fMat[3][1]);
+    SkTSwap(fMat[2][3], fMat[3][2]);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
 void SkMatrix44::mapScalars(const SkScalar src[4], SkScalar dst[4]) const {
     SkScalar result[4];
     for (int i = 0; i < 4; i++) {