OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 GrAAHairLinePathRenderer_DEFINED | 9 #ifndef GrAAHairLinePathRenderer_DEFINED |
10 #define GrAAHairLinePathRenderer_DEFINED | 10 #define GrAAHairLinePathRenderer_DEFINED |
11 | 11 |
12 #include "GrPathRenderer.h" | 12 #include "GrPathRenderer.h" |
13 | 13 |
14 class GrAAHairLinePathRenderer : public GrPathRenderer { | 14 class GrAAHairLinePathRenderer : public GrPathRenderer { |
15 public: | 15 public: |
16 virtual ~GrAAHairLinePathRenderer(); | 16 static GrPathRenderer* Create() { return SkNEW(GrAAHairLinePathRenderer); } |
17 | 17 |
18 static GrPathRenderer* Create(GrContext* context); | 18 bool canDrawPath(const GrDrawTarget*, |
19 | 19 const GrPipelineBuilder*, |
20 virtual bool canDrawPath(const GrDrawTarget*, | 20 const SkMatrix& viewMatrix, |
21 const GrPipelineBuilder*, | 21 const SkPath&, |
22 const SkMatrix& viewMatrix, | 22 const GrStrokeInfo&, |
23 const SkPath&, | 23 bool antiAlias) const override; |
24 const GrStrokeInfo&, | |
25 bool antiAlias) const override; | |
26 | 24 |
27 typedef SkTArray<SkPoint, true> PtArray; | 25 typedef SkTArray<SkPoint, true> PtArray; |
28 typedef SkTArray<int, true> IntArray; | 26 typedef SkTArray<int, true> IntArray; |
29 typedef SkTArray<float, true> FloatArray; | 27 typedef SkTArray<float, true> FloatArray; |
30 | 28 |
31 protected: | 29 protected: |
32 virtual bool onDrawPath(GrDrawTarget*, | 30 bool onDrawPath(GrDrawTarget*, |
33 GrPipelineBuilder*, | 31 GrPipelineBuilder*, |
34 GrColor, | 32 GrColor, |
35 const SkMatrix& viewMatrix, | 33 const SkMatrix& viewMatrix, |
36 const SkPath&, | 34 const SkPath&, |
37 const GrStrokeInfo&, | 35 const GrStrokeInfo&, |
38 bool antiAlias) override; | 36 bool antiAlias) override; |
39 | 37 |
40 private: | 38 private: |
41 GrAAHairLinePathRenderer(const GrContext* context, | 39 GrAAHairLinePathRenderer() {} |
42 const GrIndexBuffer* fLinesIndexBuffer, | |
43 const GrIndexBuffer* fQuadsIndexBuffer); | |
44 | |
45 const GrIndexBuffer* fLinesIndexBuffer; | |
46 const GrIndexBuffer* fQuadsIndexBuffer; | |
47 | 40 |
48 typedef GrPathRenderer INHERITED; | 41 typedef GrPathRenderer INHERITED; |
49 }; | 42 }; |
50 | 43 |
51 | 44 |
52 #endif | 45 #endif |
OLD | NEW |