Index: src/gpu/GrClipMaskManager.cpp |
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp |
index 8a7aac247aaaf8ea45ff892c6391eac97d7406a8..7ccf30f547a8bc85dfc44f84fc1a9dec6cc713eb 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); |
} |
} |