Fix float-cast-overflow in SkOpSpan::sortableTop.

Bug: skia:4632
Change-Id: I5af8bb7b04673307cdf7865bb7d56a041ba27d83
Reviewed-on: https://skia-review.googlesource.com/47320
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This commit is contained in:
Ben Wagner 2017-09-15 15:50:07 -04:00 committed by Skia Commit-Bot
parent 721aed27ac
commit b858da928b
3 changed files with 1 additions and 3 deletions

View File

@ -523,7 +523,6 @@
"~^PathBigCubic$",
"~^PathOpsCubicIntersection$",
"~^PathOpsCubicLineIntersection$",
"~^PathOpsFailOp$",
"~^PathOpsOpCubicsThreaded$",
"~^PathOpsOpLoopsThreaded$",
"--verbose"

View File

@ -542,7 +542,6 @@ def dm_flags(api, bot):
match.append('~^PathBigCubic$')
match.append('~^PathOpsCubicIntersection$')
match.append('~^PathOpsCubicLineIntersection$')
match.append('~^PathOpsFailOp$')
match.append('~^PathOpsOpCubicsThreaded$')
match.append('~^PathOpsOpLoopsThreaded$')

View File

@ -244,7 +244,7 @@ bool SkOpSpan::sortableTop(SkOpContour* contourHead) {
SkOpRayHit* hitHead = &hitBase;
dir = static_cast<SkOpRayDir>(static_cast<int>(dir) + dirOffset);
if (hitBase.fSpan && hitBase.fSpan->segment()->verb() > SkPath::kLine_Verb
&& !pt_yx(hitBase.fSlope.asSkVector(), dir)) {
&& !pt_dydx(hitBase.fSlope, dir)) {
return false;
}
SkOpContour* contour = contourHead;