1 | /* |
2 | * Copyright 2018 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 | /************************************************************************************************** |
9 | *** This file was autogenerated from GrAARectEffect.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrAARectEffect_DEFINED |
12 | #define GrAARectEffect_DEFINED |
13 | |
14 | #include "include/core/SkM44.h" |
15 | #include "include/core/SkTypes.h" |
16 | |
17 | #include "src/gpu/GrFragmentProcessor.h" |
18 | |
19 | class GrAARectEffect : public GrFragmentProcessor { |
20 | public: |
21 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> inputFP, |
22 | GrClipEdgeType edgeType, |
23 | SkRect rect) { |
24 | return std::unique_ptr<GrFragmentProcessor>( |
25 | new GrAARectEffect(std::move(inputFP), edgeType, rect)); |
26 | } |
27 | GrAARectEffect(const GrAARectEffect& src); |
28 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
29 | const char* name() const override { return "AARectEffect" ; } |
30 | GrClipEdgeType edgeType; |
31 | SkRect rect; |
32 | |
33 | private: |
34 | GrAARectEffect(std::unique_ptr<GrFragmentProcessor> inputFP, |
35 | GrClipEdgeType edgeType, |
36 | SkRect rect) |
37 | : INHERITED(kGrAARectEffect_ClassID, |
38 | (OptimizationFlags)(inputFP ? ProcessorOptimizationFlags(inputFP.get()) |
39 | : kAll_OptimizationFlags) & |
40 | kCompatibleWithCoverageAsAlpha_OptimizationFlag) |
41 | , edgeType(edgeType) |
42 | , rect(rect) { |
43 | this->registerChild(std::move(inputFP), SkSL::SampleUsage::PassThrough()); |
44 | } |
45 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
46 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
47 | bool onIsEqual(const GrFragmentProcessor&) const override; |
48 | #if GR_TEST_UTILS |
49 | SkString onDumpInfo() const override; |
50 | #endif |
51 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
52 | typedef GrFragmentProcessor INHERITED; |
53 | }; |
54 | #endif |
55 | |