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 virtual ~GrAAHairLinePathRenderer(); |
17 | 17 |
18 static GrPathRenderer* Create(GrContext* context); | 18 static GrPathRenderer* Create(GrContext* context); |
19 | 19 |
20 virtual bool canDrawPath(const SkStrokeRec& stroke, | 20 virtual bool canDrawPath(const SkPath& path, |
| 21 const SkStrokeRec& stroke, |
21 const GrDrawTarget* target, | 22 const GrDrawTarget* target, |
22 bool antiAlias) const SK_OVERRIDE; | 23 bool antiAlias) const SK_OVERRIDE; |
23 | 24 |
24 typedef SkTArray<SkPoint, true> PtArray; | 25 typedef SkTArray<SkPoint, true> PtArray; |
25 typedef SkTArray<int, true> IntArray; | 26 typedef SkTArray<int, true> IntArray; |
26 typedef SkTArray<float, true> FloatArray; | 27 typedef SkTArray<float, true> FloatArray; |
27 | 28 |
28 protected: | 29 protected: |
29 virtual bool onDrawPath(const SkStrokeRec& stroke, | 30 virtual bool onDrawPath(const SkPath& path, |
| 31 const SkStrokeRec& stroke, |
30 GrDrawTarget* target, | 32 GrDrawTarget* target, |
31 bool antiAlias) SK_OVERRIDE; | 33 bool antiAlias) SK_OVERRIDE; |
32 | 34 |
33 private: | 35 private: |
34 GrAAHairLinePathRenderer(const GrContext* context, | 36 GrAAHairLinePathRenderer(const GrContext* context, |
35 const GrIndexBuffer* fLinesIndexBuffer, | 37 const GrIndexBuffer* fLinesIndexBuffer, |
36 const GrIndexBuffer* fQuadsIndexBuffer); | 38 const GrIndexBuffer* fQuadsIndexBuffer); |
37 | 39 |
38 bool createLineGeom(const SkPath& path, | 40 bool createLineGeom(const SkPath& path, |
39 GrDrawTarget* target, | 41 GrDrawTarget* target, |
(...skipping 14 matching lines...) Expand all Loading... |
54 SkRect* devBounds); | 56 SkRect* devBounds); |
55 | 57 |
56 const GrIndexBuffer* fLinesIndexBuffer; | 58 const GrIndexBuffer* fLinesIndexBuffer; |
57 const GrIndexBuffer* fQuadsIndexBuffer; | 59 const GrIndexBuffer* fQuadsIndexBuffer; |
58 | 60 |
59 typedef GrPathRenderer INHERITED; | 61 typedef GrPathRenderer INHERITED; |
60 }; | 62 }; |
61 | 63 |
62 | 64 |
63 #endif | 65 #endif |
OLD | NEW |