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

Unified Diff: src/effects/SkDashPathEffect.cpp

Issue 15080010: Add special handling of rectori case for gpu (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Added unit test Created 7 years, 7 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 | « src/core/SkPath.cpp ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDashPathEffect.cpp
===================================================================
--- src/effects/SkDashPathEffect.cpp (revision 9163)
+++ src/effects/SkDashPathEffect.cpp (working copy)
@@ -237,6 +237,7 @@
const SkScalar* intervals = fIntervals;
SkScalar dashCount = 0;
+ int segCount = 0;
SkPath cullPathStorage;
const SkPath* srcPtr = &src;
@@ -291,6 +292,7 @@
addedSegment = false;
if (is_even(index) && dlen > 0 && !skipFirstSegment) {
addedSegment = true;
+ ++segCount;
if (specialLine) {
lineRec.addSegment(SkDoubleToScalar(distance),
@@ -322,9 +324,14 @@
if (meas.isClosed() && is_even(fInitialDashIndex) &&
fInitialDashLength > 0) {
meas.getSegment(0, SkScalarMul(fInitialDashLength, scale), dst, !addedSegment);
+ ++segCount;
}
} while (meas.nextContour());
+ if (segCount > 1) {
+ dst->setConvexity(SkPath::kConcave_Convexity);
+ }
+
return true;
}
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698