Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 504c9908abbb8015a65e7bfd7b77a2662d21154a..d81e90a6ed4c976f87b6b066b01492d7a53a6e77 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -2263,6 +2263,25 @@ void SkCanvas::drawVertices(VertexMode vmode, int vertexCount, |
LOOPER_END |
} |
+void SkCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) { |
+ |
+ // Since a patch is always within the convex hull of the control points, we discard it when its |
+ // bounding rectangle is completely outside the current clip. |
+ SkRect bounds; |
+ bounds.set(patch.getControlPoints(), 12); |
+ if (this->quickReject(bounds)) { |
+ return; |
+ } |
+ |
+ LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, NULL) |
+ |
+ while (iter.next()) { |
+ iter.fDevice->drawPatch(iter, patch, paint); |
+ } |
+ |
+ LOOPER_END |
+} |
+ |
////////////////////////////////////////////////////////////////////////////// |
// These methods are NOT virtual, and therefore must call back into virtual |
// methods, rather than actually drawing themselves. |