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

Side by Side Diff: src/pathops/SkDQuadLineIntersection.cpp

Issue 2358043002: fix skia pathops fuzzers (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkIntersections.h" 7 #include "SkIntersections.h"
8 #include "SkPathOpsCurve.h" 8 #include "SkPathOpsCurve.h"
9 #include "SkPathOpsLine.h" 9 #include "SkPathOpsLine.h"
10 #include "SkPathOpsQuad.h" 10 #include "SkPathOpsQuad.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 enum PinTPoint { 92 enum PinTPoint {
93 kPointUninitialized, 93 kPointUninitialized,
94 kPointInitialized 94 kPointInitialized
95 }; 95 };
96 96
97 LineQuadraticIntersections(const SkDQuad& q, const SkDLine& l, SkIntersectio ns* i) 97 LineQuadraticIntersections(const SkDQuad& q, const SkDLine& l, SkIntersectio ns* i)
98 : fQuad(q) 98 : fQuad(q)
99 , fLine(&l) 99 , fLine(&l)
100 , fIntersections(i) 100 , fIntersections(i)
101 , fAllowNear(true) { 101 , fAllowNear(true) {
102 i->setMax(4); // allow short partial coincidence plus discrete intersec tions 102 i->setMax(5); // allow short partial coincidence plus discrete intersec tions
103 } 103 }
104 104
105 LineQuadraticIntersections(const SkDQuad& q) 105 LineQuadraticIntersections(const SkDQuad& q)
106 : fQuad(q) 106 : fQuad(q)
107 SkDEBUGPARAMS(fLine(nullptr)) 107 SkDEBUGPARAMS(fLine(nullptr))
108 SkDEBUGPARAMS(fIntersections(nullptr)) 108 SkDEBUGPARAMS(fIntersections(nullptr))
109 SkDEBUGPARAMS(fAllowNear(false)) { 109 SkDEBUGPARAMS(fAllowNear(false)) {
110 } 110 }
111 111
112 void allowNear(bool allow) { 112 void allowNear(bool allow) {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 // SkDQuad accessors to Intersection utilities 462 // SkDQuad accessors to Intersection utilities
463 463
464 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const { 464 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const {
465 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots); 465 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots);
466 } 466 }
467 467
468 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const { 468 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const {
469 return SkIntersections::VerticalIntercept(*this, xIntercept, roots); 469 return SkIntersections::VerticalIntercept(*this, xIntercept, roots);
470 } 470 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkOpSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698