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

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

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 years, 6 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 int addSelfT(const SkPoint& pt, double newT) { 49 int addSelfT(const SkPoint& pt, double newT) {
50 return fContour->addSelfT(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 void alignTPt(SkIntersectionHelper& other, bool swap, int index,
58 SkIntersections* ts, SkPoint* point) {
59 fContour->alignTPt(fIndex, other.fContour, other.fIndex, swap, index, ts , point);
60 }
61
57 SkScalar bottom() const { 62 SkScalar bottom() const {
58 return bounds().fBottom; 63 return bounds().fBottom;
59 } 64 }
60 65
61 const SkPathOpsBounds& bounds() const { 66 const SkPathOpsBounds& bounds() const {
62 return fContour->segments()[fIndex].bounds(); 67 return fContour->segments()[fIndex].bounds();
63 } 68 }
64 69
65 void init(SkOpContour* contour) { 70 void init(SkOpContour* contour) {
66 fContour = contour; 71 fContour = contour;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 147 }
143 148
144 private: 149 private:
145 // utility callable by the user from the debugger when the implementation co de is linked in 150 // utility callable by the user from the debugger when the implementation co de is linked in
146 void dump() const; 151 void dump() const;
147 152
148 SkOpContour* fContour; 153 SkOpContour* fContour;
149 int fIndex; 154 int fIndex;
150 int fLast; 155 int fLast;
151 }; 156 };
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