blob: 2ebcd79a2fc1dab477ffaab75c0405f9e8d31e65 [file] [log] [blame]
senorblancod6ed19c2015-02-26 06:58:17 -08001/*
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 GrTessellatingPathRenderer_DEFINED
9#define GrTessellatingPathRenderer_DEFINED
10
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "src/gpu/GrPathRenderer.h"
senorblancod6ed19c2015-02-26 06:58:17 -080012
13/**
14 * Subclass that renders the path by converting to screen-space trapezoids plus
15 * extra 1-pixel geometry for AA.
16 */
Brian Salomon57f211b2019-08-21 15:21:09 -040017class GrTessellatingPathRenderer : public GrPathRenderer {
senorblancod6ed19c2015-02-26 06:58:17 -080018public:
19 GrTessellatingPathRenderer();
Stephen White8a3c0592019-05-29 11:26:16 -040020#if GR_TEST_UTILS
21 void setMaxVerbCount(int maxVerbCount) { fMaxVerbCount = maxVerbCount; }
22#endif
senorblancod6ed19c2015-02-26 06:58:17 -080023
bsalomon0aff2fa2015-07-31 06:48:27 -070024private:
Chris Dalton5ed44232017-09-07 13:22:46 -060025 CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
senorblancod6ed19c2015-02-26 06:58:17 -080026
bsalomon8acedde2016-06-24 10:42:16 -070027 StencilSupport onGetStencilSupport(const GrShape&) const override {
robertphillipse7d4b2f2015-08-13 07:57:10 -070028 return GrPathRenderer::kNoSupport_StencilSupport;
29 }
senorblancod6ed19c2015-02-26 06:58:17 -080030
bsalomon0aff2fa2015-07-31 06:48:27 -070031 bool onDrawPath(const DrawPathArgs&) override;
Stephen White8a3c0592019-05-29 11:26:16 -040032 int fMaxVerbCount;
senorblancod6ed19c2015-02-26 06:58:17 -080033
34 typedef GrPathRenderer INHERITED;
35};
36
37#endif