OLD | NEW |
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 | 7 |
8 #ifndef GrAAConvexTessellator_DEFINED | 8 #ifndef GrAAConvexTessellator_DEFINED |
9 #define GrAAConvexTessellator_DEFINED | 9 #define GrAAConvexTessellator_DEFINED |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const SkPoint& bisector(int index) const { return fPts[index].fBisector;
} | 139 const SkPoint& bisector(int index) const { return fPts[index].fBisector;
} |
140 int index(int index) const { return fPts[index].fIndex; } | 140 int index(int index) const { return fPts[index].fIndex; } |
141 int origEdgeID(int index) const { return fPts[index].fOrigEdgeId; } | 141 int origEdgeID(int index) const { return fPts[index].fOrigEdgeId; } |
142 | 142 |
143 #if GR_AA_CONVEX_TESSELLATOR_VIZ | 143 #if GR_AA_CONVEX_TESSELLATOR_VIZ |
144 void draw(SkCanvas* canvas, const GrAAConvexTessellator& tess) const; | 144 void draw(SkCanvas* canvas, const GrAAConvexTessellator& tess) const; |
145 #endif | 145 #endif |
146 | 146 |
147 private: | 147 private: |
148 void computeNormals(const GrAAConvexTessellator& result); | 148 void computeNormals(const GrAAConvexTessellator& result); |
149 void computeBisectors(); | 149 void computeBisectors(const GrAAConvexTessellator& tess); |
150 | 150 |
151 SkDEBUGCODE(bool isConvex(const GrAAConvexTessellator& tess) const;) | 151 SkDEBUGCODE(bool isConvex(const GrAAConvexTessellator& tess) const;) |
152 | 152 |
153 struct PointData { | 153 struct PointData { |
154 SkPoint fNorm; | 154 SkPoint fNorm; |
155 SkPoint fBisector; | 155 SkPoint fBisector; |
156 int fIndex; | 156 int fIndex; |
157 int fOrigEdgeId; | 157 int fOrigEdgeId; |
158 }; | 158 }; |
159 | 159 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 // If some goes wrong with the inset computation the tessellator will | 236 // If some goes wrong with the inset computation the tessellator will |
237 // truncate the creation of the inset polygon. In this case the depth | 237 // truncate the creation of the inset polygon. In this case the depth |
238 // check will complain. | 238 // check will complain. |
239 SkDEBUGCODE(bool fShouldCheckDepths;) | 239 SkDEBUGCODE(bool fShouldCheckDepths;) |
240 }; | 240 }; |
241 | 241 |
242 | 242 |
243 #endif | 243 #endif |
244 | 244 |
OLD | NEW |