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

Unified Diff: src/core/SkDraw.cpp

Issue 17739003: avoid AntiFrameRect when strokeSize is too small. Workaround for skbug/1368 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 1cfeaa34d69e604529b0a5e703a00bc883a37e92..fa572f743487e076e68a933cd35b2708b1c7f51b 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -853,6 +853,11 @@ void SkDraw::drawRect(const SkRect& rect, const SkPaint& paint) const {
SkPoint strokeSize;
RectType rtype = ComputeRectType(paint, *fMatrix, &strokeSize);
+ // work-around bug in antiframerect when strokesize is < 1
+ if (strokeSize.fX < SK_Scalar1 || strokeSize.fY < SK_Scalar1) {
+ rtype = kPath_RectType;
+ }
+
if (kPath_RectType == rtype) {
SkPath tmp;
tmp.addRect(rect);
« 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