OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrAADistanceFieldPathRenderer_DEFINED | 9 #ifndef GrAADistanceFieldPathRenderer_DEFINED |
10 #define GrAADistanceFieldPathRenderer_DEFINED | 10 #define GrAADistanceFieldPathRenderer_DEFINED |
11 | 11 |
12 #include "GrBatchAtlas.h" | 12 #include "GrBatchAtlas.h" |
13 #include "GrPathRenderer.h" | 13 #include "GrPathRenderer.h" |
14 #include "GrRect.h" | 14 #include "GrRect.h" |
15 | 15 |
16 #include "SkChecksum.h" | 16 #include "SkChecksum.h" |
17 #include "SkTDynamicHash.h" | 17 #include "SkTDynamicHash.h" |
18 | 18 |
19 class GrContext; | 19 class GrContext; |
20 | 20 |
21 class GrAADistanceFieldPathRenderer : public GrPathRenderer { | 21 class GrAADistanceFieldPathRenderer : public GrPathRenderer { |
22 public: | 22 public: |
23 GrAADistanceFieldPathRenderer(); | 23 GrAADistanceFieldPathRenderer(); |
24 virtual ~GrAADistanceFieldPathRenderer(); | 24 virtual ~GrAADistanceFieldPathRenderer(); |
25 | 25 |
26 private: | 26 private: |
27 StencilSupport onGetStencilSupport(const GrDrawTarget*, | 27 StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const
override { |
28 const GrPipelineBuilder*, | 28 return GrPathRenderer::kNoSupport_StencilSupport; |
29 const SkPath&, | 29 } |
30 const GrStrokeInfo&) const override; | |
31 | 30 |
32 bool onCanDrawPath(const CanDrawPathArgs&) const override; | 31 bool onCanDrawPath(const CanDrawPathArgs&) const override; |
33 | 32 |
34 bool onDrawPath(const DrawPathArgs&) override; | 33 bool onDrawPath(const DrawPathArgs&) override; |
35 | 34 |
36 struct PathData { | 35 struct PathData { |
37 struct Key { | 36 struct Key { |
38 uint32_t fGenID; | 37 uint32_t fGenID; |
39 // rendered size for stored path (32x32 max, 64x64 max, 128x128 max) | 38 // rendered size for stored path (32x32 max, 64x64 max, 128x128 max) |
40 uint32_t fDimension; | 39 uint32_t fDimension; |
(...skipping 26 matching lines...) Expand all Loading... |
67 PathCache fPathCache; | 66 PathCache fPathCache; |
68 PathDataList fPathList; | 67 PathDataList fPathList; |
69 | 68 |
70 typedef GrPathRenderer INHERITED; | 69 typedef GrPathRenderer INHERITED; |
71 | 70 |
72 friend class AADistanceFieldPathBatch; | 71 friend class AADistanceFieldPathBatch; |
73 friend struct PathTestStruct; | 72 friend struct PathTestStruct; |
74 }; | 73 }; |
75 | 74 |
76 #endif | 75 #endif |
OLD | NEW |