diff options
author | Yuqian Li <liyuqian@google.com> | 2018-02-07 19:04:34 +0800 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 03:57:49 +0000 |
commit | 4a657adf745ee364f00734677d0e68754ae933a7 (patch) | |
tree | b875df92f4418a159be5e9842f6fdc5c83829988 /src/core/SkScan_AAAPath.cpp | |
parent | 854f68b5859ddb3261dd536fe4fbfb4b708f778c (diff) |
Fix the left/right edge swapping in isSmoothEnough
Bug: skia:7573
Change-Id: I02d863ac15c04fab39c1d7b0b8970bad484ca12c
Reviewed-on: https://skia-review.googlesource.com/104840
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/core/SkScan_AAAPath.cpp')
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 94ddf73315..2df5338e9a 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -975,7 +975,12 @@ static inline bool isSmoothEnough(SkAnalyticEdge* leftE, SkAnalyticEdge* riteE, if (nextCurrE->fUpperY >= stop_y << 16) { // Check if we're at the end return false; } + // Ensure that currE is the next left edge and nextCurrE is the next right edge. Swap if not. +#ifdef SK_SUPPORT_LEGACY_AAA_SMOOTH if (*nextCurrE < *currE) { +#else + if (nextCurrE->fUpperX < currE->fUpperX) { +#endif SkTSwap(currE, nextCurrE); } return isSmoothEnough(leftE, currE, stop_y) && isSmoothEnough(riteE, nextCurrE, stop_y); |