Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

Issue 9254016: Merge 104609 - [skia] not all convex paths are convex, so recompute convexity for the problematic... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698