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

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

Issue 2321773002: pathops tiger checkpoint (Closed)
Patch Set: checkpoint (all not-under-development tests work) 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 | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkOpCoincidence.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkPathOpsConic.h" 8 #include "SkPathOpsConic.h"
9 #include "SkPathOpsCurve.h" 9 #include "SkPathOpsCurve.h"
10 #include "SkPathOpsLine.h" 10 #include "SkPathOpsLine.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 double rootVals[2]; 102 double rootVals[2];
103 int roots = this->intersectRay(rootVals); 103 int roots = this->intersectRay(rootVals);
104 for (int index = 0; index < roots; ++index) { 104 for (int index = 0; index < roots; ++index) {
105 double conicT = rootVals[index]; 105 double conicT = rootVals[index];
106 double lineT = this->findLineT(conicT); 106 double lineT = this->findLineT(conicT);
107 #ifdef SK_DEBUG 107 #ifdef SK_DEBUG
108 if (!fIntersections->debugGlobalState() 108 if (!fIntersections->debugGlobalState()
109 || !fIntersections->debugGlobalState()->debugSkipAssert()) { 109 || !fIntersections->debugGlobalState()->debugSkipAssert()) {
110 SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT)); 110 SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT));
111 SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT)); 111 SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT));
112 SkASSERT(conicPt.approximatelyEqual(linePt)); 112 SkASSERT(conicPt.approximatelyDEqual(linePt));
113 } 113 }
114 #endif 114 #endif
115 SkDPoint pt; 115 SkDPoint pt;
116 if (this->pinTs(&conicT, &lineT, &pt, kPointUninitialized) 116 if (this->pinTs(&conicT, &lineT, &pt, kPointUninitialized)
117 && this->uniqueAnswer(conicT, pt)) { 117 && this->uniqueAnswer(conicT, pt)) {
118 fIntersections->insert(conicT, lineT, pt); 118 fIntersections->insert(conicT, lineT, pt);
119 } 119 }
120 } 120 }
121 this->checkCoincident(); 121 this->checkCoincident();
122 return fIntersections->used(); 122 return fIntersections->used();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, doub le* roots) { 376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, doub le* roots) {
377 LineConicIntersections c(conic); 377 LineConicIntersections c(conic);
378 return c.horizontalIntersect(y, roots); 378 return c.horizontalIntersect(y, roots);
379 } 379 }
380 380
381 int SkIntersections::VerticalIntercept(const SkDConic& conic, SkScalar x, double * roots) { 381 int SkIntersections::VerticalIntercept(const SkDConic& conic, SkScalar x, double * roots) {
382 LineConicIntersections c(conic); 382 LineConicIntersections c(conic);
383 return c.verticalIntersect(x, roots); 383 return c.verticalIntersect(x, roots);
384 } 384 }
OLDNEW
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkOpCoincidence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698