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 GrCircleBlurFragmentProcessor.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrCircleBlurFragmentProcessor_DEFINED |
12 | #define GrCircleBlurFragmentProcessor_DEFINED |
13 | |
14 | #include "include/core/SkM44.h" |
15 | #include "include/core/SkTypes.h" |
16 | |
17 | #include "src/gpu/effects/GrTextureEffect.h" |
18 | |
19 | #include "src/gpu/GrFragmentProcessor.h" |
20 | |
21 | class GrCircleBlurFragmentProcessor : public GrFragmentProcessor { |
22 | public: |
23 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> inputFP, |
24 | GrRecordingContext*, |
25 | const SkRect& circle, |
26 | float sigma); |
27 | GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src); |
28 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
29 | const char* name() const override { return "CircleBlurFragmentProcessor" ; } |
30 | SkRect circleRect; |
31 | float solidRadius; |
32 | float textureRadius; |
33 | |
34 | private: |
35 | GrCircleBlurFragmentProcessor(std::unique_ptr<GrFragmentProcessor> inputFP, |
36 | SkRect circleRect, |
37 | float solidRadius, |
38 | float textureRadius, |
39 | std::unique_ptr<GrFragmentProcessor> blurProfile) |
40 | : INHERITED(kGrCircleBlurFragmentProcessor_ClassID, |
41 | (OptimizationFlags)(inputFP ? ProcessorOptimizationFlags(inputFP.get()) |
42 | : kAll_OptimizationFlags) & |
43 | kCompatibleWithCoverageAsAlpha_OptimizationFlag) |
44 | , circleRect(circleRect) |
45 | , solidRadius(solidRadius) |
46 | , textureRadius(textureRadius) { |
47 | this->registerChild(std::move(inputFP), SkSL::SampleUsage::PassThrough()); |
48 | SkASSERT(blurProfile); |
49 | this->registerChild(std::move(blurProfile), SkSL::SampleUsage::Explicit()); |
50 | } |
51 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
52 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
53 | bool onIsEqual(const GrFragmentProcessor&) const override; |
54 | #if GR_TEST_UTILS |
55 | SkString onDumpInfo() const override; |
56 | #endif |
57 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
58 | typedef GrFragmentProcessor INHERITED; |
59 | }; |
60 | #endif |
61 | |