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 GrSingleIntervalGradientColorizer.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrSingleIntervalGradientColorizer_DEFINED |
12 | #define GrSingleIntervalGradientColorizer_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 GrSingleIntervalGradientColorizer : public GrFragmentProcessor { |
19 | public: |
20 | static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f start, SkPMColor4f end) { |
21 | return std::unique_ptr<GrFragmentProcessor>( |
22 | new GrSingleIntervalGradientColorizer(start, end)); |
23 | } |
24 | GrSingleIntervalGradientColorizer(const GrSingleIntervalGradientColorizer& src); |
25 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
26 | const char* name() const override { return "SingleIntervalGradientColorizer"; } |
27 | SkPMColor4f start; |
28 | SkPMColor4f end; |
29 | |
30 | private: |
31 | GrSingleIntervalGradientColorizer(SkPMColor4f start, SkPMColor4f end) |
32 | : INHERITED(kGrSingleIntervalGradientColorizer_ClassID, kNone_OptimizationFlags) |
33 | , start(start) |
34 | , end(end) {} |
35 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
36 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
37 | bool onIsEqual(const GrFragmentProcessor&) const override; |
38 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
39 | typedef GrFragmentProcessor INHERITED; |
40 | }; |
41 | #endif |
42 |