michael@0: michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef GrBuiltInPathRenderer_DEFINED michael@0: #define GrBuiltInPathRenderer_DEFINED michael@0: michael@0: #include "GrPathRenderer.h" michael@0: michael@0: class GrContext; michael@0: class GrGpu; michael@0: michael@0: /** michael@0: * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies michael@0: * on the target having MSAA if AA is desired. michael@0: */ michael@0: class GrStencilAndCoverPathRenderer : public GrPathRenderer { michael@0: public: michael@0: michael@0: static GrPathRenderer* Create(GrContext*); michael@0: michael@0: virtual ~GrStencilAndCoverPathRenderer(); michael@0: michael@0: virtual bool canDrawPath(const SkPath&, michael@0: const SkStrokeRec&, michael@0: const GrDrawTarget*, michael@0: bool antiAlias) const SK_OVERRIDE; michael@0: michael@0: protected: michael@0: virtual StencilSupport onGetStencilSupport(const SkPath&, michael@0: const SkStrokeRec&, michael@0: const GrDrawTarget*) const SK_OVERRIDE; michael@0: michael@0: virtual bool onDrawPath(const SkPath&, michael@0: const SkStrokeRec&, michael@0: GrDrawTarget*, michael@0: bool antiAlias) SK_OVERRIDE; michael@0: michael@0: virtual void onStencilPath(const SkPath&, michael@0: const SkStrokeRec&, michael@0: GrDrawTarget*) SK_OVERRIDE; michael@0: michael@0: private: michael@0: GrStencilAndCoverPathRenderer(GrGpu*); michael@0: michael@0: GrGpu* fGpu; michael@0: michael@0: typedef GrPathRenderer INHERITED; michael@0: }; michael@0: michael@0: #endif