aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScan_AAAPath.cpp
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-08-11 14:40:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 19:05:56 +0000
commit4a31c46006d297b6230a72d1f7bbadb0ca6df429 (patch)
tree377a1b60732c72298116b03707a109d9ddaccda7 /src/core/SkScan_AAAPath.cpp
parent6dda5841285a12c6dbffca3972d1e676eff72eb3 (diff)
Don't store clipped x which could break edge order
We only need to clip a temporary x to ensure that we don't blit beyond clip. Storing such clipped x is problematic because it may make our edges unsorted. The added unit test would fail without this fix. Bug: skia:6947 Change-Id: I6c21d7c7c097e50fef18ab151921d6c07c089318 Reviewed-on: https://skia-review.googlesource.com/33420 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkScan_AAAPath.cpp')
-rw-r--r--src/core/SkScan_AAAPath.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp
index 0da39d522c..d67f7eb509 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -1467,10 +1467,10 @@ static void aaa_walk_edges(SkAnalyticEdge* prevHead, SkAnalyticEdge* nextTail,
} else {
SkFixed rite = currE->fX;
currE->goY(nextY, yShift);
- leftE->fX = SkTMax(leftClip, leftE->fX);
+ SkFixed nextLeft = SkTMax(leftClip, leftE->fX);
rite = SkTMin(rightClip, rite);
- currE->fX = SkTMin(rightClip, currE->fX);
- blit_trapezoid_row(blitter, y >> 16, left, rite, leftE->fX, currE->fX,
+ SkFixed nextRite = SkTMin(rightClip, currE->fX);
+ blit_trapezoid_row(blitter, y >> 16, left, rite, nextLeft, nextRite,
leftDY, currE->fDY, fullAlpha, maskRow, isUsingMask,
noRealBlitter || (fullAlpha == 0xFF && (
edges_too_close(prevRite, left, leftE->fX) ||