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 GrTextureGradientColorizer.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrTextureGradientColorizer_DEFINED |
12 | #define GrTextureGradientColorizer_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 GrTextureGradientColorizer : public GrFragmentProcessor { |
19 | public: |
20 | static std::unique_ptr<GrFragmentProcessor> Make(GrSurfaceProxyView gradient) { |
21 | return std::unique_ptr<GrFragmentProcessor>( |
22 | new GrTextureGradientColorizer(std::move(gradient))); |
23 | } |
24 | GrTextureGradientColorizer(const GrTextureGradientColorizer& src); |
25 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
26 | const char* name() const override { return "TextureGradientColorizer"; } |
27 | TextureSampler gradient; |
28 | |
29 | private: |
30 | GrTextureGradientColorizer(GrSurfaceProxyView gradient) |
31 | : INHERITED(kGrTextureGradientColorizer_ClassID, kNone_OptimizationFlags) |
32 | , gradient(std::move(gradient), GrSamplerState::Filter::kBilerp) { |
33 | this->setTextureSamplerCnt(1); |
34 | } |
35 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
36 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
37 | bool onIsEqual(const GrFragmentProcessor&) const override; |
38 | const TextureSampler& onTextureSampler(int) const override; |
39 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
40 | typedef GrFragmentProcessor INHERITED; |
41 | }; |
42 | #endif |
43 |