Skip to content

Commit

Permalink
Remove use of SkPath::setConvexity in GraphicsContext. (flutter#4398)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsalomon authored and brianosman committed Dec 1, 2017
1 parent 8dc5e85 commit 3afab47
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions sky/engine/platform/graphics/GraphicsContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,17 +1421,6 @@ void GraphicsContext::setPathFromConvexPoints(SkPath* path,
path->lineTo(WebCoreFloatToSkScalar(points[i].x()),
WebCoreFloatToSkScalar(points[i].y()));
}

/* The code used to just blindly call this
path->setIsConvex(true);
But webkit can sometimes send us non-convex 4-point values, so we mark the
path's convexity as unknown, so it will get computed by skia at draw time.
See crbug.com 108605
*/
SkPath::Convexity convexity = SkPath::kConvex_Convexity;
if (numPoints == 4)
convexity = SkPath::kUnknown_Convexity;
path->setConvexity(convexity);
}

void GraphicsContext::setRadii(SkVector* radii,
Expand Down

0 comments on commit 3afab47

Please sign in to comment.