blob: 9f8d8aae9e27e09a094bcc5d5e25a7706dde6201 [file] [log] [blame]
bsalomon@google.comaeb21602011-08-30 18:13:44 +00001
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
14class GrAAHairLinePathRenderer : public GrPathRenderer {
15public:
bsalomond8ed1b62015-05-04 10:09:23 -070016 virtual ~GrAAHairLinePathRenderer();
bsalomon@google.comaeb21602011-08-30 18:13:44 +000017
bsalomond8ed1b62015-05-04 10:09:23 -070018 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.com74758112013-08-17 07:01:54 +000026
jvanverth@google.com681ccf02013-08-16 14:51:51 +000027 typedef SkTArray<SkPoint, true> PtArray;
28 typedef SkTArray<int, true> IntArray;
29 typedef SkTArray<float, true> FloatArray;
skia.committer@gmail.com74758112013-08-17 07:01:54 +000030
bsalomon@google.comaeb21602011-08-30 18:13:44 +000031protected:
bsalomond8ed1b62015-05-04 10:09:23 -070032 virtual bool onDrawPath(GrDrawTarget*,
33 GrPipelineBuilder*,
34 GrColor,
35 const SkMatrix& viewMatrix,
36 const SkPath&,
37 const GrStrokeInfo&,
38 bool antiAlias) override;
rmistry@google.comd6176b02012-08-23 18:14:13 +000039
bsalomon@google.comaeb21602011-08-30 18:13:44 +000040private:
bsalomond8ed1b62015-05-04 10:09:23 -070041 GrAAHairLinePathRenderer(const GrContext* context,
42 const GrIndexBuffer* fLinesIndexBuffer,
43 const GrIndexBuffer* fQuadsIndexBuffer);
44
45 const GrIndexBuffer* fLinesIndexBuffer;
46 const GrIndexBuffer* fQuadsIndexBuffer;
bsalomon@google.comaeb21602011-08-30 18:13:44 +000047
bsalomon@google.comaeb21602011-08-30 18:13:44 +000048 typedef GrPathRenderer INHERITED;
49};
50
51
52#endif