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

Unified Diff: src/core/SkStroke.cpp

Issue 14086002: fix bug introduced with SK_IGNORE_CUBIC_STROKE_FIX where we no longer respected (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStroke.cpp
===================================================================
--- src/core/SkStroke.cpp (revision 8581)
+++ src/core/SkStroke.cpp (working copy)
@@ -10,7 +10,7 @@
#include "SkPath.h"
#define kMaxQuadSubdivide 5
-#define kMaxCubicSubdivide 4
+#define kMaxCubicSubdivide 7
static inline bool degenerate_vector(const SkVector& v) {
return !SkPoint::CanNormalize(v.fX, v.fY);
@@ -304,12 +304,8 @@
bool degenerateBC = !set_normal_unitnormal(pts[1], pts[2], fRadius,
&normalBC, &unitNormalBC);
#ifndef SK_IGNORE_CUBIC_STROKE_FIX
- if (subDivide <= 0) {
- if (degenerateBC) {
- goto DRAW_LINE;
- } else {
- goto DRAW_CUBIC;
- }
+ if (--subDivide < 0) {
+ goto DRAW_LINE;
}
#endif
if (degenerateBC || normals_too_curvy(unitNormalAB, unitNormalBC) ||
@@ -330,9 +326,6 @@
// normals for CD
this->cubic_to(&tmp[3], norm, unit, &dummy, &unitDummy, subDivide);
} else {
-#ifndef SK_IGNORE_CUBIC_STROKE_FIX
- DRAW_CUBIC:
-#endif
SkVector normalB, normalC;
// need normals to inset/outset the off-curve pts B and C
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698