diff options
author | liyuqian <liyuqian@google.com> | 2016-10-27 08:45:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-27 08:45:32 -0700 |
commit | 552889ea44baaa50368fc4aec5c304c83698040f (patch) | |
tree | fc00d4d82511a643478b6cf72de34289181ef229 | |
parent | a049ac46d497f8495e9a2e1617f53e059c15fb80 (diff) |
Do not skip fractional y for SkAAClip
This should fix the following bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=659883
https://bugs.chromium.org/p/chromium/issues/detail?id=659972
BUG=chromium:659883,chromium:659972
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2452393002
Review-Url: https://codereview.chromium.org/2452393002
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 113ddc400f..1513ce7760 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -952,8 +952,11 @@ static inline void aaa_walk_convex_edges(SkAnalyticEdge* prevHead, AdditiveBlitt } SkFixed local_bot_fixed = SkMin32(leftE->fLowerY, riteE->fLowerY); - // Skip the fractional y if edges are changing smoothly - if (isSmoothEnough(leftE, riteE, currE, stop_y)) { + // Skip the fractional y if edges are changing smoothly. + // If forceRLE is true, we won't skip the fractional y because it + // implies that SkAAClip is calling us and there are strict + // assertions inside SkAAClip. + if (isSmoothEnough(leftE, riteE, currE, stop_y) && !forceRLE) { local_bot_fixed = SkFixedCeilToFixed(local_bot_fixed); } local_bot_fixed = SkMin32(local_bot_fixed, SkIntToFixed(stop_y + 1)); |