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

Unified Diff: src/core/SkPathPriv.h

Issue 2017313002: Add SkPathPriv::IsSimpleClosedRect (Closed) Base URL: https://chromium.googlesource.com/skia.git@fixaddarc
Patch Set: fix gcc warning Created 4 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 | « src/core/SkPath.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathPriv.h
diff --git a/src/core/SkPathPriv.h b/src/core/SkPathPriv.h
index f0bab950303bb62936fe9dde1df23dd2ccf65efb..8689dee197934473f34a346a164f936c1d547dee 100644
--- a/src/core/SkPathPriv.h
+++ b/src/core/SkPathPriv.h
@@ -83,6 +83,14 @@ public:
static void AddGenIDChangeListener(const SkPath& path, SkPathRef::GenIDChangeListener* listener) {
path.fPathRef->addGenIDChangeListener(listener);
}
+
+ /**
+ * This returns true for a rect that begins and ends at the same corner and has either a move
+ * followed by four lines or a move followed by 3 lines and a close. None of the parameters are
+ * optional. This does not permit degenerate line or point rectangles.
+ */
+ static bool IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Direction* direction,
+ unsigned* start);
};
#endif
« no previous file with comments | « src/core/SkPath.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698