| 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 SkPath& path, | 20 virtual bool canDrawPath(const GrDrawTarget*, |
| 21 const SkStrokeRec& stroke, | 21 const GrDrawState*, |
| 22 const GrDrawTarget* target, | 22 const SkPath&, |
| 23 const SkStrokeRec&, |
| 23 bool antiAlias) const SK_OVERRIDE; | 24 bool antiAlias) const SK_OVERRIDE; |
| 24 | 25 |
| 25 typedef SkTArray<SkPoint, true> PtArray; | 26 typedef SkTArray<SkPoint, true> PtArray; |
| 26 typedef SkTArray<int, true> IntArray; | 27 typedef SkTArray<int, true> IntArray; |
| 27 typedef SkTArray<float, true> FloatArray; | 28 typedef SkTArray<float, true> FloatArray; |
| 28 | 29 |
| 29 protected: | 30 protected: |
| 30 virtual bool onDrawPath(const SkPath& path, | 31 virtual bool onDrawPath(GrDrawTarget*, |
| 31 const SkStrokeRec& stroke, | 32 GrDrawState*, |
| 32 GrDrawTarget* target, | 33 const SkPath&, |
| 34 const SkStrokeRec&, |
| 33 bool antiAlias) SK_OVERRIDE; | 35 bool antiAlias) SK_OVERRIDE; |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 GrAAHairLinePathRenderer(const GrContext* context, | 38 GrAAHairLinePathRenderer(const GrContext* context, |
| 37 const GrIndexBuffer* fLinesIndexBuffer, | 39 const GrIndexBuffer* fLinesIndexBuffer, |
| 38 const GrIndexBuffer* fQuadsIndexBuffer); | 40 const GrIndexBuffer* fQuadsIndexBuffer); |
| 39 | 41 |
| 40 bool createLineGeom(const SkPath& path, | 42 bool createLineGeom(GrDrawTarget* target, |
| 41 GrDrawTarget* target, | 43 GrDrawState*, |
| 44 GrDrawTarget::AutoReleaseGeometry* arg, |
| 45 SkRect* devBounds, |
| 46 const SkPath& path, |
| 42 const PtArray& lines, | 47 const PtArray& lines, |
| 43 int lineCnt, | 48 int lineCnt); |
| 44 GrDrawTarget::AutoReleaseGeometry* arg, | |
| 45 SkRect* devBounds); | |
| 46 | 49 |
| 47 bool createBezierGeom(const SkPath& path, | 50 bool createBezierGeom(GrDrawTarget* target, |
| 48 GrDrawTarget* target, | 51 GrDrawState*, |
| 52 GrDrawTarget::AutoReleaseGeometry* arg, |
| 53 SkRect* devBounds, |
| 54 const SkPath& path, |
| 49 const PtArray& quads, | 55 const PtArray& quads, |
| 50 int quadCnt, | 56 int quadCnt, |
| 51 const PtArray& conics, | 57 const PtArray& conics, |
| 52 int conicCnt, | 58 int conicCnt, |
| 53 const IntArray& qSubdivs, | 59 const IntArray& qSubdivs, |
| 54 const FloatArray& cWeights, | 60 const FloatArray& cWeights); |
| 55 GrDrawTarget::AutoReleaseGeometry* arg, | |
| 56 SkRect* devBounds); | |
| 57 | 61 |
| 58 const GrIndexBuffer* fLinesIndexBuffer; | 62 const GrIndexBuffer* fLinesIndexBuffer; |
| 59 const GrIndexBuffer* fQuadsIndexBuffer; | 63 const GrIndexBuffer* fQuadsIndexBuffer; |
| 60 | 64 |
| 61 typedef GrPathRenderer INHERITED; | 65 typedef GrPathRenderer INHERITED; |
| 62 }; | 66 }; |
| 63 | 67 |
| 64 | 68 |
| 65 #endif | 69 #endif |
| OLD | NEW |