blob: f7d98190c2b60b90ad2d302bc066389a10db107b [file] [log] [blame]
bsalomon@google.com30085192011-08-19 15:42:31 +00001/*
2 * Copyright 2011 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 GrDefaultPathRenderer_DEFINED
9#define GrDefaultPathRenderer_DEFINED
10
11#include "GrPathRenderer.h"
ethannicholas6536ae52016-05-02 12:16:49 -070012#include "GrPathStencilSettings.h"
bungemanf3c15b72015-08-19 11:56:48 -070013#include "SkTypes.h"
bsalomon@google.com30085192011-08-19 15:42:31 +000014
15/**
bsalomon@google.com45a15f52012-12-10 19:10:17 +000016 * Subclass that renders the path using the stencil buffer to resolve fill rules
17 * (e.g. winding, even-odd)
bsalomon@google.com30085192011-08-19 15:42:31 +000018 */
commit-bot@chromium.orgd28063e2013-08-20 12:23:06 +000019class SK_API GrDefaultPathRenderer : public GrPathRenderer {
bsalomon@google.com30085192011-08-19 15:42:31 +000020public:
Brian Salomon15b25092017-05-08 11:10:53 -040021 GrDefaultPathRenderer();
bsalomon@google.com30085192011-08-19 15:42:31 +000022
bsalomon@google.com30085192011-08-19 15:42:31 +000023private:
bsalomon8acedde2016-06-24 10:42:16 -070024 StencilSupport onGetStencilSupport(const GrShape&) const override;
bsalomon@google.com45a15f52012-12-10 19:10:17 +000025
Chris Dalton5ed44232017-09-07 13:22:46 -060026 CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
bsalomon@google.com30085192011-08-19 15:42:31 +000027
bsalomon0aff2fa2015-07-31 06:48:27 -070028 bool onDrawPath(const DrawPathArgs&) override;
29
30 void onStencilPath(const StencilPathArgs&) override;
bsalomon@google.com45a15f52012-12-10 19:10:17 +000031
Brian Osman11052242016-10-27 14:47:55 -040032 bool internalDrawPath(GrRenderTargetContext*,
Brian Salomon82f44312017-01-11 13:42:54 -050033 GrPaint&&,
Brian Salomon0e8fc8b2016-12-09 15:10:07 -050034 GrAAType,
robertphillipsd2b6d642016-07-21 08:55:08 -070035 const GrUserStencilSettings&,
cdalton862cff32016-05-12 15:09:48 -070036 const GrClip&,
joshualitt8059eb92014-12-29 15:10:07 -080037 const SkMatrix& viewMatrix,
bsalomon8acedde2016-06-24 10:42:16 -070038 const GrShape&,
bsalomon@google.comc2099d22012-03-02 21:26:50 +000039 bool stencilOnly);
40
bsalomon@google.com30085192011-08-19 15:42:31 +000041 typedef GrPathRenderer INHERITED;
42};
43
44#endif