Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index a6c8a1fc74fceb34ff86038324c78d25368c2fa0..4372d629152ccf30bb6629eb009d32b4ed61c40f 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -526,6 +526,21 @@ void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
///////////////////////////////////////////////////////////////////////////// |
+void SkGpuDevice::drawRegion(const SkDraw& draw, const SkRegion& region, const SkPaint& paint) { |
+ if (paint.getMaskFilter()) { |
+ SkPath path; |
+ region.getBoundaryPath(&path); |
+ return this->drawPath(draw, path, paint, nullptr, false); |
+ } |
+ |
+ GrPaint grPaint; |
+ if (!SkPaintToGrPaint(this->context(), fDrawContext.get(), paint, *draw.fMatrix, &grPaint)) { |
+ return; |
+ } |
+ |
+ fDrawContext->drawRegion(fClip, grPaint, *draw.fMatrix, region, GrStyle(paint)); |
+} |
+ |
void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval, const SkPaint& paint) { |
ASSERT_SINGLE_OWNER |
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawOval", fContext); |