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/GrContext.h b/include/gpu/GrContext.h
index 4d328d1..d8a7f91 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -410,6 +410,17 @@
const SkMatrix* localMatrix = NULL);
/**
+ * Draw a roundrect using a paint.
+ *
+ * @param paint describes how to color pixels.
+ * @param rrect the roundrect to draw
+ * @param stroke the stroke information (width, join, cap)
+ */
+ void drawRRect(const GrPaint& paint,
+ const SkRRect& rrect,
+ const SkStrokeRec& stroke);
+
+ /**
* Draws a path.
*
* @param paint describes how to color pixels.