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

Unified Diff: src/core/SkPathPriv.h

Issue 2357643002: Make GrShape compute keys for short paths from path data instead of using the gen id. (Closed)
Patch Set: Address comments Created 4 years, 3 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 | « no previous file | src/gpu/GrPath.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 60b0f2a1554a3d33ad8fc9397dd8afd7fff65fc9..029cb759deef13491062ad6aa4fbbe07be8ff198 100644
--- a/src/core/SkPathPriv.h
+++ b/src/core/SkPathPriv.h
@@ -98,6 +98,29 @@ public:
*/
static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
SkScalar sweepAngle, bool useCenter, bool isFillNoPathEffect);
+
+ /**
+ * Returns a pointer to the verb data. Note that the verbs are stored backwards in memory and
+ * thus the returned pointer is the last verb.
+ */
+ static const uint8_t* VerbData(const SkPath& path) {
+ return path.fPathRef->verbsMemBegin();
+ }
+
+ /** Returns a raw pointer to the path points */
+ static const SkPoint* PointData(const SkPath& path) {
+ return path.fPathRef->points();
+ }
+
+ /** Returns the number of conic weights in the path */
+ static int ConicWeightCnt(const SkPath& path) {
+ return path.fPathRef->countWeights();
+ }
+
+ /** Returns a raw pointer to the path conic weights. */
+ static const SkScalar* ConicWeightData(const SkPath& path) {
+ return path.fPathRef->conicWeights();
+ }
};
#endif
« no previous file with comments | « no previous file | src/gpu/GrPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698