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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrPath.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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 SkPathPriv_DEFINED 8 #ifndef SkPathPriv_DEFINED
9 #define SkPathPriv_DEFINED 9 #define SkPathPriv_DEFINED
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 */ 91 */
92 static bool IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Dir ection* direction, 92 static bool IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Dir ection* direction,
93 unsigned* start); 93 unsigned* start);
94 94
95 /** 95 /**
96 * Creates a path from arc params using the semantics of SkCanvas::drawArc. This function 96 * Creates a path from arc params using the semantics of SkCanvas::drawArc. This function
97 * assumes empty ovals and zero sweeps have already been filtered out. 97 * assumes empty ovals and zero sweeps have already been filtered out.
98 */ 98 */
99 static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar sta rtAngle, 99 static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar sta rtAngle,
100 SkScalar sweepAngle, bool useCenter, bool isFi llNoPathEffect); 100 SkScalar sweepAngle, bool useCenter, bool isFi llNoPathEffect);
101
102 /**
103 * Returns a pointer to the verb data. Note that the verbs are stored backwa rds in memory and
104 * thus the returned pointer is the last verb.
105 */
106 static const uint8_t* VerbData(const SkPath& path) {
107 return path.fPathRef->verbsMemBegin();
108 }
109
110 /** Returns a raw pointer to the path points */
111 static const SkPoint* PointData(const SkPath& path) {
112 return path.fPathRef->points();
113 }
114
115 /** Returns the number of conic weights in the path */
116 static int ConicWeightCnt(const SkPath& path) {
117 return path.fPathRef->countWeights();
118 }
119
120 /** Returns a raw pointer to the path conic weights. */
121 static const SkScalar* ConicWeightData(const SkPath& path) {
122 return path.fPathRef->conicWeights();
123 }
101 }; 124 };
102 125
103 #endif 126 #endif
OLDNEW
« 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