Share code with SkRect

http://codereview.appspot.com/4523046/



git-svn-id: http://skia.googlecode.com/svn/trunk@1277 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/SkGr.h b/include/gpu/SkGr.h
index bcb6766..eef70b1 100644
--- a/include/gpu/SkGr.h
+++ b/include/gpu/SkGr.h
@@ -104,27 +104,8 @@
 
 #include "SkColorPriv.h"
 
-static inline GrRect Sk2Gr(const SkRect& src) {
-    return GrRect(SkScalarToGrScalar(src.fLeft),
-                  SkScalarToGrScalar(src.fTop),
-                  SkScalarToGrScalar(src.fRight),
-                  SkScalarToGrScalar(src.fBottom));
-}
-
 class SkGr {
 public:
-    static inline SkIRect& SetIRect(SkIRect* dst, const GrIRect& src) {
-        GR_STATIC_ASSERT(sizeof(*dst) == sizeof(src));
-        memcpy(dst, &src, sizeof(*dst));
-        return *dst;
-    }
-
-    static inline GrIRect& SetIRect(GrIRect* dst, const SkIRect& src) {
-        GR_STATIC_ASSERT(sizeof(*dst) == sizeof(src));
-        memcpy(dst, &src, sizeof(*dst));
-        return *dst;
-    }
-
     /**
      *  Convert the SkBitmap::Config to the corresponding PixelConfig, or
      *  kUnknown_PixelConfig if the conversion cannot be done.
@@ -203,7 +184,7 @@
         if (!fCurr->fRect) {
             rect->setEmpty();
         } else {
-            *rect = Sk2Gr(*fCurr->fRect);
+            *rect = *fCurr->fRect;
         }
     }