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