Index: include/gpu/GrDrawContext.h |
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h |
index 8042ab12c690a572cc109d480d08d2e754049aed..c61d22339539d1e7e44ef625f14d92e9a6925054 100644 |
--- a/include/gpu/GrDrawContext.h |
+++ b/include/gpu/GrDrawContext.h |
@@ -140,6 +140,22 @@ public: |
const SkRRect& rrect, |
const GrStrokeInfo&); |
+ /** |
+ * Shortcut for drawing an SkPath consisting of nested rrects using a paint. |
+ * Does not support stroking. The result is undefined if outer does not contain |
+ * inner. |
+ * |
+ * @param paint describes how to color pixels. |
+ * @param viewMatrix transformation matrix |
+ * @param outer the outer roundrect |
+ * @param inner the inner roundrect |
+ */ |
+ void drawDRRect(const GrClip&, |
+ const GrPaint&, |
+ const SkMatrix& viewMatrix, |
+ const SkRRect& outer, |
+ const SkRRect& inner); |
+ |
/** |
* Draws a path. |
* |
@@ -280,6 +296,12 @@ private: |
friend class GrAtlasTextBlob; // for access to drawBatch |
friend class GrDrawingManager; // for ctor |
+ bool drawFilledDRRect(const GrClip& clip, |
+ const GrPaint& paint, |
+ const SkMatrix& viewMatrix, |
+ const SkRRect& origOuter, |
+ const SkRRect& origInner); |
+ |
void internalDrawPath(GrPipelineBuilder*, |
const SkMatrix& viewMatrix, |
GrColor, |