kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 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 | |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 8 | #ifndef DashLinePathRenderer_DEFINED |
| 9 | #define DashLinePathRenderer_DEFINED |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 10 | |
Robert Phillips | db0ec08 | 2021-08-19 12:30:12 -0400 | [diff] [blame] | 11 | #include "src/gpu/v1/PathRenderer.h" |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 12 | |
Robert Phillips | 646e429 | 2017-06-13 12:44:56 -0400 | [diff] [blame] | 13 | class GrGpu; |
Greg Daniel | 77b53f6 | 2016-10-18 11:48:51 -0400 | [diff] [blame] | 14 | |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 15 | namespace skgpu::v1 { |
Robert Phillips | a628605 | 2020-04-13 10:55:08 -0400 | [diff] [blame] | 16 | |
Robert Phillips | db0ec08 | 2021-08-19 12:30:12 -0400 | [diff] [blame] | 17 | class DashLinePathRenderer final : public PathRenderer { |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 18 | public: |
| 19 | DashLinePathRenderer() = default; |
| 20 | |
| 21 | const char* name() const override { return "DashLine"; } |
| 22 | |
| 23 | private: |
Chris Dalton | 5ed4423 | 2017-09-07 13:22:46 -0600 | [diff] [blame] | 24 | CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 25 | |
Michael Ludwig | 2686d69 | 2020-04-17 20:21:37 +0000 | [diff] [blame] | 26 | StencilSupport onGetStencilSupport(const GrStyledShape&) const override { |
robertphillips | e7d4b2f | 2015-08-13 07:57:10 -0700 | [diff] [blame] | 27 | return kNoSupport_StencilSupport; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 28 | } |
| 29 | |
bsalomon | 0aff2fa | 2015-07-31 06:48:27 -0700 | [diff] [blame] | 30 | bool onDrawPath(const DrawPathArgs&) override; |
| 31 | |
Hal Canary | 144caf5 | 2016-11-07 17:57:18 -0500 | [diff] [blame] | 32 | sk_sp<GrGpu> fGpu; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 33 | }; |
| 34 | |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 35 | } // namespace skgpu::v1 |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 36 | |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 37 | #endif // DashLinePathRenderer_DEFINED |