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 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "src/gpu/GrPathRenderer.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 | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 17 | class DashLinePathRenderer final : public GrPathRenderer { |
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; |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 33 | |
John Stiles | 7571f9e | 2020-09-02 22:42:33 -0400 | [diff] [blame] | 34 | using INHERITED = GrPathRenderer; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 35 | }; |
36 | |||||
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 37 | } // namespace skgpu::v1 |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 38 | |
Robert Phillips | 461c539 | 2021-08-17 16:42:51 -0400 | [diff] [blame] | 39 | #endif // DashLinePathRenderer_DEFINED |