Minimize use of SkDraw's matrix in SkGpuDevice.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6604068

git-svn-id: http://skia.googlecode.com/svn/trunk@5906 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index b941894..558468c 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -145,21 +145,10 @@
     bool bindDeviceAsTexture(GrPaint* paint);
 
     void prepareDraw(const SkDraw&); // sets the render target, clip, and matrix on GrContext.
-    bool shouldTileBitmap(const SkBitmap& bitmap,
-                          const GrTextureParams& sampler,
-                          const SkRect* srcRectPtr) const;
-    void internalDrawBitmap(const SkDraw&,
-                            const SkBitmap&,
-                            const SkRect&,
-                            const SkMatrix&,
-                            const GrTextureParams& params,
-                            GrPaint* grPaint);
-    void drawTiledBitmap(const SkDraw& draw,
-                         const SkBitmap& bitmap,
-                         const SkRect& srcRect,
-                         const SkMatrix& m,
-                         const GrTextureParams& params,
-                         GrPaint* grPaint);
+
+    /**
+     * Implementation for both drawBitmap and drawBitmapRect.
+     */
     void drawBitmapCommon(const SkDraw&,
                           const SkBitmap& bitmap,
                           const SkRect* srcRectPtr,
@@ -167,6 +156,24 @@
                           const SkPaint&);
 
     /**
+     * Helper functions called by drawBitmapCommon. By the time these are called the SkDraw's
+     * matrix has already been set on GrContext
+     */
+    bool shouldTileBitmap(const SkBitmap& bitmap,
+                          const GrTextureParams& sampler,
+                          const SkRect* srcRectPtr) const;
+    void internalDrawBitmap(const SkBitmap&,
+                            const SkRect&,
+                            const SkMatrix&,
+                            const GrTextureParams& params,
+                            GrPaint* grPaint);
+    void drawTiledBitmap(const SkBitmap& bitmap,
+                         const SkRect& srcRect,
+                         const SkMatrix& m,
+                         const GrTextureParams& params,
+                         GrPaint* grPaint);
+
+    /**
      * Returns non-initialized instance.
      */
     GrTextContext* getTextContext();