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 | |
| 8 | #ifndef GrDashLinePathRenderer_DEFINED |
| 9 | #define GrDashLinePathRenderer_DEFINED |
| 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 | |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 15 | class GrDashLinePathRenderer : public GrPathRenderer { |
bsalomon | 0aff2fa | 2015-07-31 06:48:27 -0700 | [diff] [blame] | 16 | private: |
Robert Phillips | a628605 | 2020-04-13 10:55:08 -0400 | [diff] [blame] | 17 | const char* name() const final { return "DashLine"; } |
| 18 | |
Chris Dalton | 5ed4423 | 2017-09-07 13:22:46 -0600 | [diff] [blame] | 19 | CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 20 | |
Michael Ludwig | 2686d69 | 2020-04-17 20:21:37 +0000 | [diff] [blame^] | 21 | StencilSupport onGetStencilSupport(const GrStyledShape&) const override { |
robertphillips | e7d4b2f | 2015-08-13 07:57:10 -0700 | [diff] [blame] | 22 | return kNoSupport_StencilSupport; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 23 | } |
| 24 | |
bsalomon | 0aff2fa | 2015-07-31 06:48:27 -0700 | [diff] [blame] | 25 | bool onDrawPath(const DrawPathArgs&) override; |
| 26 | |
Hal Canary | 144caf5 | 2016-11-07 17:57:18 -0500 | [diff] [blame] | 27 | sk_sp<GrGpu> fGpu; |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 28 | typedef GrPathRenderer INHERITED; |
| 29 | }; |
| 30 | |
| 31 | |
| 32 | #endif |