OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrPathRendering_DEFINED | 8 #ifndef GrPathRendering_DEFINED |
9 #define GrPathRendering_DEFINED | 9 #define GrPathRendering_DEFINED |
10 | 10 |
11 #include "SkPath.h" | 11 #include "SkPath.h" |
| 12 #include "GrPathRange.h" |
12 | 13 |
13 class SkStrokeRec; | 14 class SkStrokeRec; |
| 15 class SkDescriptor; |
| 16 class SkTypeface; |
14 class GrPath; | 17 class GrPath; |
15 class GrPathRange; | |
16 class GrGpu; | 18 class GrGpu; |
17 | 19 |
18 /** | 20 /** |
19 * Abstract class wrapping HW path rendering API. | 21 * Abstract class wrapping HW path rendering API. |
20 * | 22 * |
21 * The subclasses of this class use the possible HW API to render paths (as oppo
sed to path | 23 * The subclasses of this class use the possible HW API to render paths (as oppo
sed to path |
22 * rendering implemented in Skia on top of a "3d" HW API). | 24 * rendering implemented in Skia on top of a "3d" HW API). |
23 * The subclasses hold the global state needed to render paths, including shadow
of the global HW | 25 * The subclasses hold the global state needed to render paths, including shadow
of the global HW |
24 * API state. Similar to GrGpu. | 26 * API state. Similar to GrGpu. |
25 * | 27 * |
(...skipping 27 matching lines...) Expand all Loading... |
53 case kAffine_PathTransformType: | 55 case kAffine_PathTransformType: |
54 return 6; | 56 return 6; |
55 | 57 |
56 default: | 58 default: |
57 SkFAIL("Unknown path transform type"); | 59 SkFAIL("Unknown path transform type"); |
58 return 0; | 60 return 0; |
59 } | 61 } |
60 } | 62 } |
61 | 63 |
62 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) = 0; | 64 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) = 0; |
63 virtual GrPathRange* createPathRange(size_t size, const SkStrokeRec&) = 0; | 65 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, const SkSt
rokeRec&) = 0; |
| 66 virtual GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, co
nst SkStrokeRec&) = 0; |
64 virtual void stencilPath(const GrPath*, SkPath::FillType) = 0; | 67 virtual void stencilPath(const GrPath*, SkPath::FillType) = 0; |
65 virtual void drawPath(const GrPath*, SkPath::FillType) = 0; | 68 virtual void drawPath(const GrPath*, SkPath::FillType) = 0; |
66 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou
nt, | 69 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou
nt, |
67 const float transforms[], PathTransformType, SkPath::
FillType) = 0; | 70 const float transforms[], PathTransformType, SkPath::
FillType) = 0; |
68 protected: | 71 protected: |
69 GrPathRendering() { } | 72 GrPathRendering() { } |
70 | 73 |
71 private: | 74 private: |
72 GrPathRendering& operator=(const GrPathRendering&); | 75 GrPathRendering& operator=(const GrPathRendering&); |
73 }; | 76 }; |
74 | 77 |
75 #endif | 78 #endif |
OLD | NEW |