2 * Copyright 2011 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef GrDefaultPathRenderer_DEFINED
9 #define GrDefaultPathRenderer_DEFINED
11 #include "GrPathRenderer.h"
12 #include "SkTemplates.h"
15 * Subclass that renders the path using the stencil buffer to resolve fill rules
16 * (e.g. winding, even-odd)
18 class SK_API GrDefaultPathRenderer : public GrPathRenderer {
20 GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSupport);
22 virtual bool canDrawPath(const GrDrawTarget*,
23 const GrPipelineBuilder*,
24 const SkMatrix& viewMatrix,
27 bool antiAlias) const override;
31 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
32 const GrPipelineBuilder*,
34 const SkStrokeRec&) const override;
36 virtual bool onDrawPath(GrDrawTarget*,
39 const SkMatrix& viewMatrix,
42 bool antiAlias) override;
44 virtual void onStencilPath(GrDrawTarget*,
46 const SkMatrix& viewMatrix,
48 const SkStrokeRec&) override;
50 bool internalDrawPath(GrDrawTarget*,
53 const SkMatrix& viewMatrix,
58 bool fSeparateStencil;
61 typedef GrPathRenderer INHERITED;