diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-17 19:50:02 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-17 19:50:02 +0000 |
commit | 5c056399259bb7ec06ff1eb8ce904001b363276c (patch) | |
tree | 09082a274471f25868c102bbf27e44dfae65e91a /src | |
parent | 2c56cb858f9227599746828d1a06b1b1588b44f0 (diff) |
Fix another clipstack element !rect doesn't mean path bug.
BUG=skia:2183
R=robertphillips@google.com
TBR=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/169763002
git-svn-id: http://skia.googlecode.com/svn/trunk@13481 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 8a7aac247a..7ccf30f547 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -1021,24 +1021,10 @@ GrTexture* GrClipMaskManager::createSoftwareClipMask(int32_t elementsGenID, helper.draw(temp, SkRegion::kXOR_Op, false, 0xFF); } - if (Element::kRect_Type == element->getType()) { - // convert the rect to a path so we can invert the fill - SkPath temp; - temp.addRect(element->getRect()); - temp.setFillType(SkPath::kInverseEvenOdd_FillType); - - helper.draw(temp, stroke, SkRegion::kReplace_Op, - element->isAA(), - 0x00); - } else { - SkASSERT(Element::kPath_Type == element->getType()); - SkPath clipPath = element->getPath(); - clipPath.toggleInverseFillType(); - helper.draw(clipPath, stroke, - SkRegion::kReplace_Op, - element->isAA(), - 0x00); - } + SkPath clipPath; + element->asPath(&clipPath); + clipPath.toggleInverseFillType(); + helper.draw(clipPath, stroke, SkRegion::kReplace_Op, element->isAA(), 0x00); continue; } @@ -1048,8 +1034,9 @@ GrTexture* GrClipMaskManager::createSoftwareClipMask(int32_t elementsGenID, if (Element::kRect_Type == element->getType()) { helper.draw(element->getRect(), op, element->isAA(), 0xFF); } else { - SkASSERT(Element::kPath_Type == element->getType()); - helper.draw(element->getPath(), stroke, op, element->isAA(), 0xFF); + SkPath path; + element->asPath(&path); + helper.draw(path, stroke, op, element->isAA(), 0xFF); } } |