blob: 9cf34d871216bf68fcaf77f05e17957def84d7d4 [file] [log] [blame]
sugoi@google.come3453cb2013-01-07 14:26:40 +00001/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "GrPathRenderer.h"
9
10// This path renderer is made to create geometry (i.e. primitives) from the original path (before
11// the path is stroked) and render using the GPU directly rather than using any software rendering
12// step. It can be rendered in a single pass for simple cases and use multiple passes for features
13// like AA or opacity support.
14
15class GrStrokePathRenderer : public GrPathRenderer {
16
17public:
18 GrStrokePathRenderer();
19
20 virtual bool canDrawPath(const SkPath& path,
21 const SkStrokeRec& stroke,
22 const GrDrawTarget* target,
23 bool antiAlias) const SK_OVERRIDE;
24
25protected:
26 virtual bool onDrawPath(const SkPath& path,
27 const SkStrokeRec& stroke,
28 GrDrawTarget* target,
29 bool antiAlias) SK_OVERRIDE;
30};