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
This commit is contained in:
parent
2c56cb858f
commit
5c05639925
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user