Detect inverse-fill, and treat its bounds as huge (all of integer space) for the
purposes of comparing w/ the clip-bounds, otherwise we can reject the draw if the bounds of the path are outside the bounds of the clip. Review URL: https://codereview.appspot.com/6302058 git-svn-id: http://skia.googlecode.com/svn/trunk@4214 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
b073d920c9
commit
97caebc746
@ -540,6 +540,14 @@ void sk_blit_below(SkBlitter* blitter, const SkIRect& ir, const SkRegion& clip)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const SkIRect gHugeIRect = {
|
||||
SK_MinS32, SK_MinS32, SK_MaxS32, SK_MaxS32
|
||||
};
|
||||
|
||||
/**
|
||||
* If the caller is drawing an inverse-fill path, then it shouldn't pass a
|
||||
* huge rect for ir, since the path draws "everywhere".
|
||||
*/
|
||||
SkScanClipper::SkScanClipper(SkBlitter* blitter, const SkRegion* clip,
|
||||
const SkIRect& ir) {
|
||||
fBlitter = NULL; // null means blit nothing
|
||||
@ -610,7 +618,8 @@ void SkScan::FillPath(const SkPath& path, const SkRegion& origClip,
|
||||
return;
|
||||
}
|
||||
|
||||
SkScanClipper clipper(blitter, clipPtr, ir);
|
||||
SkScanClipper clipper(blitter, clipPtr,
|
||||
path.isInverseFillType() ? gHugeIRect : ir);
|
||||
|
||||
blitter = clipper.getBlitter();
|
||||
if (blitter) {
|
||||
|
Loading…
Reference in New Issue
Block a user