OLD | NEW |
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 GrTessellator_DEFINED | 8 #ifndef GrTessellator_DEFINED |
9 #define GrTessellator_DEFINED | 9 #define GrTessellator_DEFINED |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 struct WindingVertex { | 31 struct WindingVertex { |
32 SkPoint fPos; | 32 SkPoint fPos; |
33 int fWinding; | 33 int fWinding; |
34 }; | 34 }; |
35 | 35 |
36 // Triangulates a path to an array of vertices. Each triangle is represented as
a set of three | 36 // Triangulates a path to an array of vertices. Each triangle is represented as
a set of three |
37 // WindingVertex entries, each of which contains the position and winding count
(which is the same | 37 // WindingVertex entries, each of which contains the position and winding count
(which is the same |
38 // for all three vertices of a triangle). The 'verts' out parameter is set to po
int to the resultant | 38 // for all three vertices of a triangle). The 'verts' out parameter is set to po
int to the resultant |
39 // vertex array. CALLER IS RESPONSIBLE for deleting this buffer to avoid a memor
y leak! | 39 // vertex array. CALLER IS RESPONSIBLE for deleting this buffer to avoid a memor
y leak! |
40 int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBou
nds, | 40 int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBou
nds, |
41 WindingVertex** verts); | 41 WindingVertex** verts); |
42 | 42 |
43 int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBo
unds, | 43 int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBo
unds, |
44 VertexAllocator*, bool *isLinear); | 44 VertexAllocator*, bool *isLinear); |
45 } | 45 } |
46 | 46 |
47 #endif | 47 #endif |
OLD | NEW |