Cleanup/unify matrix transform for PDF backend.

Review URL: http://codereview.appspot.com/2719041

git-svn-id: http://skia.googlecode.com/svn/trunk@617 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 7ef7d8c..5c82d78 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -292,6 +292,13 @@
     */
     bool invert(SkMatrix* inverse) const;
 
+    /** Fills the passed array with the tranform values in the right order
+        for PDFs.  If the matrix is a perspective transform, returns false
+        and fills the array with an identity transform.
+        @param transform  The array to fill in.
+    */
+    bool pdfTransform(SkScalar transform[6]) const;
+
     /** Apply this matrix to the array of points specified by src, and write
         the transformed points into the array of points specified by dst.
         dst[] = M * src[]
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index 5421299..fb74c63 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -110,8 +110,9 @@
     SkRefPtr<SkPDFArray> getMediaBox();
 
     /** Returns a string with the page contents.
+     *  @param flipOrigin  Flip the origin between top and bottom.
      */
-    SkString content();
+    SkString content(bool flipOrigin) const;
 
 private:
     int fWidth;