aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkEdgeClipper.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-18 17:49:28 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-18 17:49:28 +0000
commit64d6295b0f6d500ccb3e8091adb2c334925dc388 (patch)
treedd4a9a6d29f43dc17378f725dd864e878cc84617 /src/core/SkEdgeClipper.cpp
parent7da456d52b58a5361581e6db441ca91b347c4eb2 (diff)
increase iteration count from 16 to 24, when computing cubic-line intersection.
This fixes crbug 170666. Before the fix, were were finishing the "clip" step with a curve that was still partly negative, and so as assert would fire. added unittest to confirm that the assert doesn't fire. git-svn-id: http://skia.googlecode.com/svn/trunk@7278 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkEdgeClipper.cpp')
-rw-r--r--src/core/SkEdgeClipper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp
index 84d6e9b6c2..11b919a9f5 100644
--- a/src/core/SkEdgeClipper.cpp
+++ b/src/core/SkEdgeClipper.cpp
@@ -246,7 +246,7 @@ static bool chopMonoCubicAt(SkScalar c0, SkScalar c1, SkScalar c2, SkScalar c3,
SkScalar maxT = SK_Scalar1;
SkScalar mid;
int i;
- for (i = 0; i < 16; i++) {
+ for (i = 0; i < 24; i++) {
mid = SkScalarAve(minT, maxT);
SkScalar delta = eval_cubic_coeff(A, B, C, D, mid);
if (delta < 0) {