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

Side by Side Diff: src/core/SkEdgeBuilder.cpp

Issue 837023002: fixes for conics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/pathops/SkOpEdgeBuilder.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkEdgeBuilder.h" 8 #include "SkEdgeBuilder.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkEdge.h" 10 #include "SkEdge.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 int shiftUp) { 165 int shiftUp) {
166 fAlloc.reset(); 166 fAlloc.reset();
167 fList.reset(); 167 fList.reset();
168 fShiftUp = shiftUp; 168 fShiftUp = shiftUp;
169 169
170 if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) { 170 if (SkPath::kLine_SegmentMask == path.getSegmentMasks()) {
171 return this->buildPoly(path, iclip, shiftUp); 171 return this->buildPoly(path, iclip, shiftUp);
172 } 172 }
173 173
174 SkAutoConicToQuads quadder; 174 SkAutoConicToQuads quadder;
175 const SkScalar conicTol = (SK_Scalar1 / 4) * (1 << shiftUp); 175 const SkScalar conicTol = SK_Scalar1 / 4;
176 176
177 SkPath::Iter iter(path, true); 177 SkPath::Iter iter(path, true);
178 SkPoint pts[4]; 178 SkPoint pts[4];
179 SkPath::Verb verb; 179 SkPath::Verb verb;
180 180
181 if (iclip) { 181 if (iclip) {
182 SkRect clip; 182 SkRect clip;
183 setShiftedClip(&clip, *iclip, shiftUp); 183 setShiftedClip(&clip, *iclip, shiftUp);
184 SkEdgeClipper clipper; 184 SkEdgeClipper clipper;
185 185
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 } 256 }
257 default: 257 default:
258 SkDEBUGFAIL("unexpected verb"); 258 SkDEBUGFAIL("unexpected verb");
259 break; 259 break;
260 } 260 }
261 } 261 }
262 } 262 }
263 fEdgeList = fList.begin(); 263 fEdgeList = fList.begin();
264 return fList.count(); 264 return fList.count();
265 } 265 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698