1 
2 /*
3  * Copyright 2011 Google Inc.
4  *
5  * Use of this source code is governed by a BSD-style license that can be
6  * found in the LICENSE file.
7  */
8 
9 #ifndef GrAAHairLinePathRenderer_DEFINED
10 #define GrAAHairLinePathRenderer_DEFINED
11 
12 #include "GrPathRenderer.h"
13 
14 class GrAAHairLinePathRenderer : public GrPathRenderer {
15 public:
Create()16     static GrPathRenderer* Create()  { return SkNEW(GrAAHairLinePathRenderer); }
17 
18     bool canDrawPath(const GrDrawTarget*,
19                      const GrPipelineBuilder*,
20                      const SkMatrix& viewMatrix,
21                      const SkPath&,
22                      const GrStrokeInfo&,
23                      bool antiAlias) const override;
24 
25     typedef SkTArray<SkPoint, true> PtArray;
26     typedef SkTArray<int, true> IntArray;
27     typedef SkTArray<float, true> FloatArray;
28 
29 protected:
30     bool onDrawPath(GrDrawTarget*,
31                     GrPipelineBuilder*,
32                     GrColor,
33                     const SkMatrix& viewMatrix,
34                     const SkPath&,
35                     const GrStrokeInfo&,
36                     bool antiAlias) override;
37 
38 private:
GrAAHairLinePathRenderer()39     GrAAHairLinePathRenderer() {}
40 
41     typedef GrPathRenderer INHERITED;
42 };
43 
44 
45 #endif
46