diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkScan_Path.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index 66e9507678..b32d68e734 100644 --- a/src/core/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp @@ -602,7 +602,11 @@ void SkScan::FillPath(const SkPath& path, const SkRegion& origClip, // don't reference "origClip" any more, just use clipPtr SkIRect ir; - path.getBounds().round(&ir); + // We deliberately call dround() instead of round(), since we can't afford to generate a + // bounds that is tighter than the corresponding SkEdges. The edge code basically converts + // the floats to fixed, and then "rounds". If we called round() instead of dround() here, + // we could generate the wrong ir for values like 0.4999997. + path.getBounds().dround(&ir); if (ir.isEmpty()) { if (path.isInverseFillType()) { blitter->blitRegion(*clipPtr); |