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

Side by Side Diff: src/pathops/SkIntersectionHelper.h

Issue 131103009: update pathops to circle sort (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable old test that still fails on linux 32 release Created 6 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 unified diff | Download patch
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.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 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 "SkOpContour.h" 7 #include "SkOpContour.h"
8 #include "SkPath.h" 8 #include "SkPath.h"
9 9
10 #ifdef SK_DEBUG 10 #ifdef SK_DEBUG
(...skipping 28 matching lines...) Expand all
39 39
40 // Avoid collapsing t values that are close to the same since 40 // Avoid collapsing t values that are close to the same since
41 // we walk ts to describe consecutive intersections. Since a pair of ts can 41 // we walk ts to describe consecutive intersections. Since a pair of ts can
42 // be nearly equal, any problems caused by this should be taken care 42 // be nearly equal, any problems caused by this should be taken care
43 // of later. 43 // of later.
44 // On the edge or out of range values are negative; add 2 to get end 44 // On the edge or out of range values are negative; add 2 to get end
45 int addT(const SkIntersectionHelper& other, const SkPoint& pt, double newT) { 45 int addT(const SkIntersectionHelper& other, const SkPoint& pt, double newT) {
46 return fContour->addT(fIndex, other.fContour, other.fIndex, pt, newT); 46 return fContour->addT(fIndex, other.fContour, other.fIndex, pt, newT);
47 } 47 }
48 48
49 int addSelfT(const SkIntersectionHelper& other, const SkPoint& pt, double ne wT) { 49 int addSelfT(const SkPoint& pt, double newT) {
50 return fContour->addSelfT(fIndex, other.fContour, other.fIndex, pt, newT ); 50 return fContour->addSelfT(fIndex, pt, newT);
51 } 51 }
52 52
53 bool advance() { 53 bool advance() {
54 return ++fIndex < fLast; 54 return ++fIndex < fLast;
55 } 55 }
56 56
57 SkScalar bottom() const { 57 SkScalar bottom() const {
58 return bounds().fBottom; 58 return bounds().fBottom;
59 } 59 }
60 60
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 SkScalar y() const { 136 SkScalar y() const {
137 return bounds().fTop; 137 return bounds().fTop;
138 } 138 }
139 139
140 bool yFlipped() const { 140 bool yFlipped() const {
141 return y() != pts()[0].fY; 141 return y() != pts()[0].fY;
142 } 142 }
143 143
144 #ifdef SK_DEBUG 144 private:
145 void dump() { 145 // utility callable by the user from the debugger when the implementation co de is linked in
146 SkDPoint::dump(pts()[0]); 146 void dump() const;
147 SkDPoint::dump(pts()[1]);
148 if (verb() >= SkPath::kQuad_Verb) {
149 SkDPoint::dump(pts()[2]);
150 }
151 if (verb() >= SkPath::kCubic_Verb) {
152 SkDPoint::dump(pts()[3]);
153 }
154 }
155 #endif
156 147
157 private:
158 SkOpContour* fContour; 148 SkOpContour* fContour;
159 int fIndex; 149 int fIndex;
160 int fLast; 150 int fLast;
161 }; 151 };
OLDNEW
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698