| 1 | /* | 
|---|---|
| 2 | * Copyright 2014 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 | #ifndef GrSmallPathRenderer_DEFINED | 
| 9 | #define GrSmallPathRenderer_DEFINED | 
| 10 | |
| 11 | #include "src/gpu/GrPathRenderer.h" | 
| 12 | |
| 13 | class GrDrawOp; | 
| 14 | class GrRecordingContext; | 
| 15 | class GrStyledShape; | 
| 16 | |
| 17 | class GrSmallPathRenderer : public GrPathRenderer { | 
| 18 | public: | 
| 19 | GrSmallPathRenderer(); | 
| 20 | ~GrSmallPathRenderer() override; | 
| 21 | |
| 22 | const char* name() const final { return "Small"; } | 
| 23 | |
| 24 | static std::unique_ptr<GrDrawOp> createOp_TestingOnly(GrRecordingContext*, | 
| 25 | GrPaint&&, | 
| 26 | const GrStyledShape&, | 
| 27 | const SkMatrix& viewMatrix, | 
| 28 | bool gammaCorrect, | 
| 29 | const GrUserStencilSettings*); | 
| 30 | |
| 31 | private: | 
| 32 | class SmallPathOp; | 
| 33 | |
| 34 | StencilSupport onGetStencilSupport(const GrStyledShape&) const override { | 
| 35 | return GrPathRenderer::kNoSupport_StencilSupport; | 
| 36 | } | 
| 37 | |
| 38 | CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override; | 
| 39 | |
| 40 | bool onDrawPath(const DrawPathArgs&) override; | 
| 41 | |
| 42 | typedef GrPathRenderer INHERITED; | 
| 43 | }; | 
| 44 | |
| 45 | #endif | 
| 46 | 
