• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2015 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 GrTessellatingPathRenderer_DEFINED
9 #define GrTessellatingPathRenderer_DEFINED
10 
11 #include "src/gpu/GrPathRenderer.h"
12 
13 /**
14  *  Subclass that renders the path by converting to screen-space trapezoids plus
15  *   extra 1-pixel geometry for AA.
16  */
17 class SK_API GrTessellatingPathRenderer : public GrPathRenderer {
18 public:
19     GrTessellatingPathRenderer();
20 #if GR_TEST_UTILS
setMaxVerbCount(int maxVerbCount)21     void setMaxVerbCount(int maxVerbCount) { fMaxVerbCount = maxVerbCount; }
22 #endif
23 
24 private:
25     CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
26 
onGetStencilSupport(const GrShape &)27     StencilSupport onGetStencilSupport(const GrShape&) const override {
28         return GrPathRenderer::kNoSupport_StencilSupport;
29     }
30 
31     bool onDrawPath(const DrawPathArgs&) override;
32     int fMaxVerbCount;
33 
34     typedef GrPathRenderer INHERITED;
35 };
36 
37 #endif
38