bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 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: |
bsalomon | d8ed1b6 | 2015-05-04 10:09:23 -0700 | [diff] [blame^] | 16 | virtual ~GrAAHairLinePathRenderer(); |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 17 | |
bsalomon | d8ed1b6 | 2015-05-04 10:09:23 -0700 | [diff] [blame^] | 18 | static GrPathRenderer* Create(GrContext* context); |
| 19 | |
| 20 | virtual bool canDrawPath(const GrDrawTarget*, |
| 21 | const GrPipelineBuilder*, |
| 22 | const SkMatrix& viewMatrix, |
| 23 | const SkPath&, |
| 24 | const GrStrokeInfo&, |
| 25 | bool antiAlias) const override; |
skia.committer@gmail.com | 7475811 | 2013-08-17 07:01:54 +0000 | [diff] [blame] | 26 | |
jvanverth@google.com | 681ccf0 | 2013-08-16 14:51:51 +0000 | [diff] [blame] | 27 | typedef SkTArray<SkPoint, true> PtArray; |
| 28 | typedef SkTArray<int, true> IntArray; |
| 29 | typedef SkTArray<float, true> FloatArray; |
skia.committer@gmail.com | 7475811 | 2013-08-17 07:01:54 +0000 | [diff] [blame] | 30 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 31 | protected: |
bsalomon | d8ed1b6 | 2015-05-04 10:09:23 -0700 | [diff] [blame^] | 32 | virtual bool onDrawPath(GrDrawTarget*, |
| 33 | GrPipelineBuilder*, |
| 34 | GrColor, |
| 35 | const SkMatrix& viewMatrix, |
| 36 | const SkPath&, |
| 37 | const GrStrokeInfo&, |
| 38 | bool antiAlias) override; |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 39 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 40 | private: |
bsalomon | d8ed1b6 | 2015-05-04 10:09:23 -0700 | [diff] [blame^] | 41 | GrAAHairLinePathRenderer(const GrContext* context, |
| 42 | const GrIndexBuffer* fLinesIndexBuffer, |
| 43 | const GrIndexBuffer* fQuadsIndexBuffer); |
| 44 | |
| 45 | const GrIndexBuffer* fLinesIndexBuffer; |
| 46 | const GrIndexBuffer* fQuadsIndexBuffer; |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 47 | |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 48 | typedef GrPathRenderer INHERITED; |
| 49 | }; |
| 50 | |
| 51 | |
| 52 | #endif |