diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 13:53:10 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-19 13:53:10 +0000 |
commit | 2a67e123a3e559774a16a58cbe5106bc0fb86740 (patch) | |
tree | b55bd6606e329ded2b58310f925a78e615bbe1d1 /src/core/SkCanvas.cpp | |
parent | 2ee3c2ce6499cb7ce15b59420dd4514ad01d0318 (diff) |
This adds a checkbox to the debugger to allow seeing the effect pathops has on the clip. A new tab shows the C code that the pathops generate.
Once in place, this CL found a bug in the pathops code where it was not handling empty clip stack elements correctly. The Cl also has the change to SkCanvas to fix this bug.
R=robertphillips@google.com, reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/282283002
git-svn-id: http://skia.googlecode.com/svn/trunk@14774 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 57cf850fa0..65002125a3 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1544,11 +1544,10 @@ void SkCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edg const SkClipStack::Element* element; while ((element = iter.next())) { SkClipStack::Element::Type type = element->getType(); - if (type == SkClipStack::Element::kEmpty_Type) { - continue; - } SkPath operand; - element->asPath(&operand); + if (type != SkClipStack::Element::kEmpty_Type) { + element->asPath(&operand); + } SkRegion::Op elementOp = element->getOp(); if (elementOp == SkRegion::kReplace_Op) { devPath = operand; |