blob: fa1134b10c16f469bf0e27b4d0ade7b64bbdc7be [file] [log] [blame]
kkinnunen18996512015-04-26 23:18:49 -07001/*
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 Phillips461c5392021-08-17 16:42:51 -04008#ifndef DashLinePathRenderer_DEFINED
9#define DashLinePathRenderer_DEFINED
kkinnunen18996512015-04-26 23:18:49 -070010
Robert Phillipsdb0ec082021-08-19 12:30:12 -040011#include "src/gpu/v1/PathRenderer.h"
kkinnunen18996512015-04-26 23:18:49 -070012
Robert Phillips646e4292017-06-13 12:44:56 -040013class GrGpu;
Greg Daniel77b53f62016-10-18 11:48:51 -040014
Robert Phillips461c5392021-08-17 16:42:51 -040015namespace skgpu::v1 {
Robert Phillipsa6286052020-04-13 10:55:08 -040016
Robert Phillipsdb0ec082021-08-19 12:30:12 -040017class DashLinePathRenderer final : public PathRenderer {
Robert Phillips461c5392021-08-17 16:42:51 -040018public:
19 DashLinePathRenderer() = default;
20
21 const char* name() const override { return "DashLine"; }
22
23private:
Chris Dalton5ed44232017-09-07 13:22:46 -060024 CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
kkinnunen18996512015-04-26 23:18:49 -070025
Michael Ludwig2686d692020-04-17 20:21:37 +000026 StencilSupport onGetStencilSupport(const GrStyledShape&) const override {
robertphillipse7d4b2f2015-08-13 07:57:10 -070027 return kNoSupport_StencilSupport;
kkinnunen18996512015-04-26 23:18:49 -070028 }
29
bsalomon0aff2fa2015-07-31 06:48:27 -070030 bool onDrawPath(const DrawPathArgs&) override;
31
Hal Canary144caf52016-11-07 17:57:18 -050032 sk_sp<GrGpu> fGpu;
kkinnunen18996512015-04-26 23:18:49 -070033};
34
Robert Phillips461c5392021-08-17 16:42:51 -040035} // namespace skgpu::v1
kkinnunen18996512015-04-26 23:18:49 -070036
Robert Phillips461c5392021-08-17 16:42:51 -040037#endif // DashLinePathRenderer_DEFINED