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

Unified Diff: include/core/SkGeometry.h

Issue 16195004: add asserts to point<-->verb helpers (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/config/SkUserConfig.h ('k') | include/core/SkPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkGeometry.h
diff --git a/include/core/SkGeometry.h b/include/core/SkGeometry.h
index 6218ed1843aec6b7843f9f3bbf27c123b9f2c78c..2c37fff3e4a0f2a8f3a21a5a1ff128ce37cce7a8 100644
--- a/include/core/SkGeometry.h
+++ b/include/core/SkGeometry.h
@@ -230,7 +230,16 @@ struct SkConic {
void computeAsQuadError(SkVector* err) const;
bool asQuadTol(SkScalar tol) const;
+ /**
+ * return the power-of-2 number of quads needed to approximate this conic
+ * with a sequence of quads. Will be >= 0.
+ */
int computeQuadPOW2(SkScalar tol) const;
+
+ /**
+ * Chop this conic into N quads, stored continguously in pts[], where
+ * N = 1 << pow2. The amount of storage needed is (1 + 2 * N)
+ */
int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const;
bool findXExtrema(SkScalar* t) const;
« no previous file with comments | « include/config/SkUserConfig.h ('k') | include/core/SkPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698