Index: Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp |
=================================================================== |
--- Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (revision 105336) |
+++ Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (working copy) |
@@ -440,7 +440,17 @@ |
path->lineTo(WebCoreFloatToSkScalar(points[i].x()), |
WebCoreFloatToSkScalar(points[i].y())); |
} |
- path->setIsConvex(true); |
+ |
+ /* 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::drawConvexPolygon(size_t numPoints, |