Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 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 SmallPathRenderer_DEFINED |
| 9 | #define SmallPathRenderer_DEFINED |
| 10 | |
Robert Phillips | db0ec08 | 2021-08-19 12:30:12 -0400 | [diff] [blame] | 11 | #include "src/gpu/v1/PathRenderer.h" |
Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 12 | |
Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 13 | class GrStyledShape; |
| 14 | |
| 15 | namespace skgpu::v1 { |
| 16 | |
Robert Phillips | db0ec08 | 2021-08-19 12:30:12 -0400 | [diff] [blame] | 17 | class SmallPathRenderer final : public PathRenderer { |
Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 18 | public: |
| 19 | SmallPathRenderer() = default; |
| 20 | |
| 21 | const char* name() const override { return "Small"; } |
| 22 | |
| 23 | private: |
| 24 | StencilSupport onGetStencilSupport(const GrStyledShape&) const override { |
Robert Phillips | db0ec08 | 2021-08-19 12:30:12 -0400 | [diff] [blame] | 25 | return PathRenderer::kNoSupport_StencilSupport; |
Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override; |
| 29 | |
| 30 | bool onDrawPath(const DrawPathArgs&) override; |
Robert Phillips | 17dc658 | 2021-08-17 11:57:31 -0400 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | } // namespace skgpu::v1 |
| 34 | |
| 35 | #endif // SmallPathRenderer_DEFINED |