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 GrDualIntervalGradientColorizer.fp; do not modify. |
10 | **************************************************************************************************/ |
11 | #ifndef GrDualIntervalGradientColorizer_DEFINED |
12 | #define GrDualIntervalGradientColorizer_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 GrDualIntervalGradientColorizer : public GrFragmentProcessor { |
19 | public: |
20 | static std::unique_ptr<GrFragmentProcessor> Make(const SkPMColor4f& c0, |
21 | const SkPMColor4f& c1, |
22 | const SkPMColor4f& c2, |
23 | const SkPMColor4f& c3, |
24 | float threshold); |
25 | GrDualIntervalGradientColorizer(const GrDualIntervalGradientColorizer& src); |
26 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
27 | const char* name() const override { return "DualIntervalGradientColorizer" ; } |
28 | SkPMColor4f scale01; |
29 | SkPMColor4f bias01; |
30 | SkPMColor4f scale23; |
31 | SkPMColor4f bias23; |
32 | float threshold; |
33 | |
34 | private: |
35 | GrDualIntervalGradientColorizer(SkPMColor4f scale01, |
36 | SkPMColor4f bias01, |
37 | SkPMColor4f scale23, |
38 | SkPMColor4f bias23, |
39 | float threshold) |
40 | : INHERITED(kGrDualIntervalGradientColorizer_ClassID, kNone_OptimizationFlags) |
41 | , scale01(scale01) |
42 | , bias01(bias01) |
43 | , scale23(scale23) |
44 | , bias23(bias23) |
45 | , threshold(threshold) {} |
46 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
47 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
48 | bool onIsEqual(const GrFragmentProcessor&) const override; |
49 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
50 | typedef GrFragmentProcessor INHERITED; |
51 | }; |
52 | #endif |
53 | |