Add GPU support for axis-aligned ovals:
- Add drawOval base function to SkDevice, and override in SkGpuDevice
- Move isSimilarityMatrix to SkMatrix (renamed to isSimilarity) and fixed up unit test
- Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() and GrContext::internalDrawOval() to avoid duplicate code
- Hooked in axis-aligned oval fill shader
- Enabled GPU stroked circles
- Added stroked circle bench test
Review URL: https://codereview.appspot.com/7137050
git-svn-id: http://skia.googlecode.com/svn/trunk@7304 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index b1e9dd6..399b372 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -442,15 +442,12 @@
* Draws an oval.
*
* @param paint describes how to color pixels.
- * @param rect the bounding rect of the oval.
- * @param strokeWidth if strokeWidth < 0, then the oval is filled, else
- * the rect is stroked based on strokeWidth. If
- * strokeWidth == 0, then the stroke is always a single
- * pixel thick.
+ * @param oval the bounding rect of the oval.
+ * @param stroke the stroke information (width, style)
*/
void drawOval(const GrPaint& paint,
- const GrRect& rect,
- SkScalar strokeWidth);
+ const GrRect& oval,
+ const SkStrokeRec& stroke);
///////////////////////////////////////////////////////////////////////////
// Misc.
@@ -910,6 +907,9 @@
void internalDrawPath(const GrPaint& paint, const SkPath& path, const SkStrokeRec& stroke);
+ void internalDrawOval(const GrPaint& paint, const GrRect& oval, const SkStrokeRec& stroke);
+ bool canDrawOval(const GrPaint& paint, const GrRect& oval, const SkStrokeRec& stroke) const;
+
GrTexture* createResizedTexture(const GrTextureDesc& desc,
const GrCacheID& cacheID,
void* srcData,