Debian Codegraph @

src/gpu/ganesh/ops/DefaultPathRenderer.h

raw
1 /*
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 DefaultPathRenderer_DEFINED
9 #define DefaultPathRenderer_DEFINED
10
11 #include "src/gpu/ganesh/PathRenderer.h"
12
13 class GrClip;
14 class GrPaint;
15 class GrStyledShape;
16 class SkMatrix;
17 enum class GrAAType : unsigned int;
18 struct GrUserStencilSettings;
19
20 namespace skgpu::ganesh {
21
22 class SurfaceDrawContext;
23
24 /**
25 * Subclass that renders the path using the stencil buffer to resolve fill rules
26 * (e.g. winding, even-odd)
27 */
28 class DefaultPathRenderer final : public PathRenderer {
29 public:
30 DefaultPathRenderer() = default;
31
32 const char* name() const override { return "Default"; }
33
34 private:
35 StencilSupport onGetStencilSupport(const GrStyledShape&) const override;
36
37 CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
38
39 bool onDrawPath(const DrawPathArgs&) override;
40
41 void onStencilPath(const StencilPathArgs&) override;
42
43 bool internalDrawPath(SurfaceDrawContext*,
44 GrPaint&&,
45 GrAAType,
46 const GrUserStencilSettings&,
47 const GrClip*,
48 const SkMatrix& viewMatrix,
49 const GrStyledShape&,
50 bool stencilOnly);
51 };
52
53 } // namespace skgpu::ganesh
54
55 #endif // DefaultPathRenderer_DEFINED