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

Unified Diff: src/core/SkGeometry.h

Issue 787763007: extract cubic classification from gpu into geometry (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix accidental change Created 6 years 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 | « no previous file | src/core/SkGeometry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGeometry.h
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
index 50756437504bc0148f0cf0a7d052e1230a68ef78..c8a69a97e371c037ee754e35572c72d2897097d3 100644
--- a/src/core/SkGeometry.h
+++ b/src/core/SkGeometry.h
@@ -191,6 +191,20 @@ bool SkXRayCrossesMonotonicCubic(const SkXRay& pt, const SkPoint cubic[4],
int SkNumXRayCrossingsForCubic(const SkXRay& pt, const SkPoint cubic[4],
bool* ambiguous = NULL);
+enum SkCubicType {
+ kSerpentine_SkCubicType,
+ kCusp_SkCubicType,
+ kLoop_SkCubicType,
+ kQuadratic_SkCubicType,
+ kLine_SkCubicType,
+ kPoint_SkCubicType
+};
+
+/** Returns the cubic classification. Pass scratch storage for computing inflection data,
+ which can be used with additional work to find the loop intersections and so on.
+*/
+SkCubicType SkClassifyCubic(const SkPoint p[4], SkScalar inflection[3]);
+
///////////////////////////////////////////////////////////////////////////////
enum SkRotationDirection {
« no previous file with comments | « no previous file | src/core/SkGeometry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698