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

Side by Side Diff: src/core/SkGeometry.h

Issue 1035943002: use new faster/vector impl for chopping conics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix bench Created 5 years, 9 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 | « bench/PathBench.cpp ('k') | src/core/SkGeometry.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkGeometry_DEFINED 8 #ifndef SkGeometry_DEFINED
9 #define SkGeometry_DEFINED 9 #define SkGeometry_DEFINED
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 * If tangent is not null, return its tangent at the t-value. NOTE the 214 * If tangent is not null, return its tangent at the t-value. NOTE the
215 * tangent value's length is arbitrary, and only its direction should 215 * tangent value's length is arbitrary, and only its direction should
216 * be used. 216 * be used.
217 */ 217 */
218 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const; 218 void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = NULL) const;
219 void chopAt(SkScalar t, SkConic dst[2]) const; 219 void chopAt(SkScalar t, SkConic dst[2]) const;
220 void chop(SkConic dst[2]) const; 220 void chop(SkConic dst[2]) const;
221 221
222 SkPoint evalAt(SkScalar t) const; 222 SkPoint evalAt(SkScalar t) const;
223 SkVector evalTangentAt(SkScalar t) const; 223 SkVector evalTangentAt(SkScalar t) const;
224 void chop2(SkConic dst[2]) const;
225 224
226 void computeAsQuadError(SkVector* err) const; 225 void computeAsQuadError(SkVector* err) const;
227 bool asQuadTol(SkScalar tol) const; 226 bool asQuadTol(SkScalar tol) const;
228 227
229 /** 228 /**
230 * return the power-of-2 number of quads needed to approximate this conic 229 * return the power-of-2 number of quads needed to approximate this conic
231 * with a sequence of quads. Will be >= 0. 230 * with a sequence of quads. Will be >= 0.
232 */ 231 */
233 int computeQuadPOW2(SkScalar tol) const; 232 int computeQuadPOW2(SkScalar tol) const;
234 233
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 private: 304 private:
306 enum { 305 enum {
307 kQuadCount = 8, // should handle most conics 306 kQuadCount = 8, // should handle most conics
308 kPointCount = 1 + 2 * kQuadCount, 307 kPointCount = 1 + 2 * kQuadCount,
309 }; 308 };
310 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; 309 SkAutoSTMalloc<kPointCount, SkPoint> fStorage;
311 int fQuadCount; // #quads for current usage 310 int fQuadCount; // #quads for current usage
312 }; 311 };
313 312
314 #endif 313 #endif
OLDNEW
« no previous file with comments | « bench/PathBench.cpp ('k') | src/core/SkGeometry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698