3 * Copyright 2012 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
9 #ifndef GrBuiltInPathRenderer_DEFINED
10 #define GrBuiltInPathRenderer_DEFINED
12 #include "GrPathRenderer.h"
18 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
19 * on the target having MSAA if AA is desired.
21 class GrStencilAndCoverPathRenderer : public GrPathRenderer {
24 static GrPathRenderer* Create(GrContext*);
26 virtual ~GrStencilAndCoverPathRenderer();
28 virtual bool canDrawPath(const GrDrawTarget*,
29 const GrPipelineBuilder*,
30 const SkMatrix& viewMatrix,
33 bool antiAlias) const SK_OVERRIDE;
36 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
37 const GrPipelineBuilder*,
39 const SkStrokeRec&) const SK_OVERRIDE;
41 virtual bool onDrawPath(GrDrawTarget*,
44 const SkMatrix& viewMatrix,
47 bool antiAlias) SK_OVERRIDE;
49 virtual void onStencilPath(GrDrawTarget*,
51 const SkMatrix& viewMatrix,
53 const SkStrokeRec&) SK_OVERRIDE;
56 GrStencilAndCoverPathRenderer(GrGpu*);
60 typedef GrPathRenderer INHERITED;