/src/skia/src/gpu/ganesh/ops/TessellationPathRenderer.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2019 Google LLC. |
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 TessellationPathRenderer_DEFINED |
9 | | #define TessellationPathRenderer_DEFINED |
10 | | |
11 | | #include "src/gpu/ganesh/PathRenderer.h" |
12 | | |
13 | | class GrCaps; |
14 | | class GrStyledShape; |
15 | | |
16 | | namespace skgpu::ganesh { |
17 | | |
18 | | // This is the tie-in point for path rendering via PathTessellateOp. This path renderer draws |
19 | | // paths using a hybrid Red Book "stencil, then cover" method. Curves get linearized by GPU |
20 | | // tessellation shaders. This path renderer doesn't apply analytic AA, so it requires MSAA if AA is |
21 | | // desired. |
22 | | class TessellationPathRenderer final : public PathRenderer { |
23 | | public: |
24 | | static bool IsSupported(const GrCaps&); |
25 | | |
26 | 0 | const char* name() const override { return "Tessellation"; } |
27 | | |
28 | | private: |
29 | | StencilSupport onGetStencilSupport(const GrStyledShape&) const override; |
30 | | CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override; |
31 | | bool onDrawPath(const DrawPathArgs&) override; |
32 | | void onStencilPath(const StencilPathArgs&) override; |
33 | | }; |
34 | | |
35 | | } // namespace skgpu::ganesh |
36 | | |
37 | | #endif // TessellationPathRenderer_DEFINED |