diff options
author | Mike Reed <reed@google.com> | 2018-05-02 13:19:24 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-02 18:03:38 +0000 |
commit | e02d38af8b7f0a5c6664c66432647381a9612100 (patch) | |
tree | de254dbb0386c23d166fcce6803a1251b6edcdb6 /src/core/SkScan_AAAPath.cpp | |
parent | 1c2a5892f1ba41b56abe3ec629ef197a905bcefe (diff) |
use SkLeftShift in case the first arg is negative
Bug: oss-fuzz:6117
Change-Id: I08521aaf4372a63428a1f663f4da78e72dfdf225
Reviewed-on: https://skia-review.googlesource.com/125344
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkScan_AAAPath.cpp')
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index e4e6701cea..3d78525d31 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -961,7 +961,7 @@ static inline bool isSmoothEnough(SkAnalyticEdge* thisEdge, SkAnalyticEdge* next // If yes, we can later skip the fractional y and directly jump to integer y. static inline bool isSmoothEnough(SkAnalyticEdge* leftE, SkAnalyticEdge* riteE, SkAnalyticEdge* currE, int stop_y) { - if (currE->fUpperY >= stop_y << 16) { + if (currE->fUpperY >= SkLeftShift(stop_y, 16)) { return false; // We're at the end so we won't skip anything } if (leftE->fLowerY + SK_Fixed1 < riteE->fLowerY) { |