Chromium Code Reviews| Index: src/core/SkAAClip.cpp |
| diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp |
| index 1a60754d91370a1888a6b99842bf77de24b88580..16f02ac04d72eb50e4c0ec6fece292d977508f79 100644 |
| --- a/src/core/SkAAClip.cpp |
| +++ b/src/core/SkAAClip.cpp |
| @@ -1403,12 +1403,15 @@ bool SkAAClip::setPath(const SkPath& path, const SkRegion* clip, bool doAA) { |
| clip = &tmpClip; |
| } |
| + SkRegion realClip(*clip); |
|
reed1
2016/11/09 21:27:42
nit: real doesn't convey much. How about tightClip
|
| + |
| if (path.isInverseFillType()) { |
| ibounds = clip->getBounds(); |
| } else { |
| if (ibounds.isEmpty() || !ibounds.intersect(clip->getBounds())) { |
| return this->setEmpty(); |
| } |
| + realClip.op(ibounds, SkRegion::kIntersect_Op); |
| } |
| Builder builder(ibounds); |
| @@ -1416,12 +1419,12 @@ bool SkAAClip::setPath(const SkPath& path, const SkRegion* clip, bool doAA) { |
| if (doAA) { |
| if (gSkUseAnalyticAA.load()) { |
| - SkScan::AAAFillPath(path, *clip, &blitter, true); |
| + SkScan::AAAFillPath(path, realClip, &blitter, true); |
| } else { |
| - SkScan::AntiFillPath(path, *clip, &blitter, true); |
| + SkScan::AntiFillPath(path, realClip, &blitter, true); |
| } |
| } else { |
| - SkScan::FillPath(path, *clip, &blitter); |
| + SkScan::FillPath(path, realClip, &blitter); |
| } |
| blitter.finish(); |