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 | #include "include/core/SkTypes.h" |
14 | #include "include/core/SkM44.h" |
15 | |
16 | #include "src/gpu/GrCoordTransform.h" |
17 | #include "src/gpu/GrFragmentProcessor.h" |
18 | class GrCircleBlurFragmentProcessor : public GrFragmentProcessor { |
19 | public: |
20 | static std::unique_ptr<GrFragmentProcessor> Make(GrRecordingContext*, |
21 | const SkRect& circle, |
22 | float sigma); |
23 | GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src); |
24 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
25 | const char* name() const override { return "CircleBlurFragmentProcessor" ; } |
26 | SkRect circleRect; |
27 | float textureRadius; |
28 | float solidRadius; |
29 | TextureSampler blurProfileSampler; |
30 | |
31 | private: |
32 | GrCircleBlurFragmentProcessor(SkRect circleRect, |
33 | float textureRadius, |
34 | float solidRadius, |
35 | GrSurfaceProxyView blurProfileSampler) |
36 | : INHERITED(kGrCircleBlurFragmentProcessor_ClassID, |
37 | (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag) |
38 | , circleRect(circleRect) |
39 | , textureRadius(textureRadius) |
40 | , solidRadius(solidRadius) |
41 | , blurProfileSampler(std::move(blurProfileSampler)) { |
42 | this->setTextureSamplerCnt(1); |
43 | } |
44 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
45 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
46 | bool onIsEqual(const GrFragmentProcessor&) const override; |
47 | const TextureSampler& onTextureSampler(int) const override; |
48 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
49 | typedef GrFragmentProcessor INHERITED; |
50 | }; |
51 | #endif |
52 | |