aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/SkPictureRecord.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index edc67a064e..96467387b7 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -365,6 +365,12 @@ bool SkPictureRecord::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
}
bool SkPictureRecord::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
+
+ SkRect r;
+ if (path.isRect(&r)) {
+ return this->clipRect(r, op, doAA);
+ }
+
addDraw(CLIP_PATH);
addPath(path);
addInt(ClipParams_pack(op, doAA));