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

Side by Side Diff: src/gpu/GrAAConvexTessellator.h

Issue 1151623002: Fix for bisector computation bug in GrAAConvexTessellator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/gpu/GrAAConvexTessellator.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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAAConvexTessellator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698