sw_engine stroke: initialize a missing variable.

Change-Id: I1c3d83d56045f592ff89a5462d4de494e50c9d34
This commit is contained in:
Hermet Park 2020-06-23 17:38:59 +09:00
parent 55e215e6ea
commit b212df1061

View file

@ -297,13 +297,11 @@ static void _inside(SwStroke& stroke, int32_t side, SwFixed lineLength)
auto border = stroke.borders + side; auto border = stroke.borders + side;
auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2; auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2;
SwPoint delta; SwPoint delta;
bool intersect; bool intersect = false;
/* Only intersect borders if between two line_to's and both /* Only intersect borders if between two line_to's and both
lines are long enough (line length is zero fur curves). */ lines are long enough (line length is zero fur curves). */
if (!border->movable || lineLength == 0) { if (border->movable && lineLength > 0) {
intersect = false;
} else {
//compute minimum required length of lines //compute minimum required length of lines
SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta))); SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta)));
if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true; if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true;