Add GPU support for roundrects

This uses the OvalRenderer to render roundrects as "stretched ovals." It adds an
additional shader that handles the straight edges of ellipsoid roundrects better, 
and uses the circle shader for roundrects where the two radii are the same. Only
axis-aligned, simple roundrects are supported. Handles fill, stroke and hairline.

R=bsalomon@google.com, robertphillips@google.com, reed@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/13852049

git-svn-id: http://skia.googlecode.com/svn/trunk@8859 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrOvalRenderer.h b/include/gpu/GrOvalRenderer.h
index 7e46dac..68e6070 100644
--- a/include/gpu/GrOvalRenderer.h
+++ b/include/gpu/GrOvalRenderer.h
@@ -20,18 +20,20 @@
 class SkStrokeRec;
 
 /*
- * This class wraps helper functions that draw ovals (filled & stroked)
+ * This class wraps helper functions that draw ovals and roundrects (filled & stroked)
  */
 class GrOvalRenderer : public GrRefCnt {
 public:
     SK_DECLARE_INST_COUNT(GrOvalRenderer)
 
-    GrOvalRenderer() {}
-
+    GrOvalRenderer() : fRRectIndexBuffer(NULL) {}
     ~GrOvalRenderer() {}
 
     bool drawOval(GrDrawTarget* target, const GrContext* context, const GrPaint& paint,
                   const GrRect& oval, const SkStrokeRec& stroke);
+    bool drawSimpleRRect(GrDrawTarget* target, GrContext* context, const GrPaint& paint,
+                         const SkRRect& rrect, const SkStrokeRec& stroke);
+
 private:
     bool drawEllipse(GrDrawTarget* target, const GrPaint& paint,
                      const GrRect& ellipse,
@@ -40,6 +42,10 @@
                     const GrRect& circle,
                     const SkStrokeRec& stroke);
 
+    GrIndexBuffer* rRectIndexBuffer(GrGpu* gpu);
+    
+    GrIndexBuffer* fRRectIndexBuffer;
+    
     typedef GrRefCnt INHERITED;
 };