diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-07 13:01:25 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-07 13:01:25 +0000 |
commit | 3302783ea7edf667794b088e5fc0656946b99816 (patch) | |
tree | 505ca54d415f22b5a4b8876cabb0c067aed7e8bf | |
parent | 796a1753d96eb0c76e742c8288617d758ddf33df (diff) |
Convert clipPaths to clipRects where possible in pictureRecord
https://codereview.appspot.com/6820104/
git-svn-id: http://skia.googlecode.com/svn/trunk@6325 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkPictureRecord.cpp | 6 |
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)); |