Batch consecutive draw rects.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@800 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrRect.h b/gpu/include/GrRect.h
index 5192ebd..e98913a 100644
--- a/gpu/include/GrRect.h
+++ b/gpu/include/GrRect.h
@@ -131,7 +131,7 @@
      *  Initialize a rectangle to a point.
      *  @param pt the point used to initialize the rectanglee.
      */
-    GrRect(GrPoint pt) {
+    explicit GrRect(const GrPoint& pt) {
         setToPoint(pt);
     }
 
@@ -187,6 +187,11 @@
     bool isInverted() const {
         return (fLeft > fRight) || (fTop > fBottom);
     }
+
+    bool contains(const GrPoint& point) const {
+        return point.fX >= fLeft && point.fX < fRight &&
+               point.fY >= fTop && point.fY < fBottom;
+    }
     
     /**
      *  Initialize a rectangle to a point.