Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 4cf40e9c5a9afbf48e022043deca55ea7f8977c1..fc1897526cde8679dab48cd323db81362c829fda 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1975,6 +1975,18 @@ void SkCanvas::drawRect(const SkRect& r, const SkPaint& paint) { |
this->onDrawRect(r, paint); |
} |
+void SkCanvas::drawRegion(const SkRegion& region, const SkPaint& paint) { |
+ if (region.isEmpty()) { |
+ return; |
+ } |
+ |
+ if (region.isRect()) { |
+ return this->drawIRect(region.getBounds(), paint); |
+ } |
+ |
+ this->onDrawRegion(region, paint); |
+} |
+ |
void SkCanvas::drawOval(const SkRect& r, const SkPaint& paint) { |
this->onDrawOval(r, paint); |
} |