• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 GrUnrolledBinaryGradientColorizer.fp; do not modify.
10  **************************************************************************************************/
11 #ifndef GrUnrolledBinaryGradientColorizer_DEFINED
12 #define GrUnrolledBinaryGradientColorizer_DEFINED
13 #include "SkTypes.h"
14 #include "GrFragmentProcessor.h"
15 #include "GrCoordTransform.h"
16 class GrUnrolledBinaryGradientColorizer : public GrFragmentProcessor {
17 public:
18     static const int kMaxColorCount = 16;
intervalCount()19     int32_t intervalCount() const { return fIntervalCount; }
scale0_1()20     const SkPMColor4f& scale0_1() const { return fScale0_1; }
scale2_3()21     const SkPMColor4f& scale2_3() const { return fScale2_3; }
scale4_5()22     const SkPMColor4f& scale4_5() const { return fScale4_5; }
scale6_7()23     const SkPMColor4f& scale6_7() const { return fScale6_7; }
scale8_9()24     const SkPMColor4f& scale8_9() const { return fScale8_9; }
scale10_11()25     const SkPMColor4f& scale10_11() const { return fScale10_11; }
scale12_13()26     const SkPMColor4f& scale12_13() const { return fScale12_13; }
scale14_15()27     const SkPMColor4f& scale14_15() const { return fScale14_15; }
bias0_1()28     const SkPMColor4f& bias0_1() const { return fBias0_1; }
bias2_3()29     const SkPMColor4f& bias2_3() const { return fBias2_3; }
bias4_5()30     const SkPMColor4f& bias4_5() const { return fBias4_5; }
bias6_7()31     const SkPMColor4f& bias6_7() const { return fBias6_7; }
bias8_9()32     const SkPMColor4f& bias8_9() const { return fBias8_9; }
bias10_11()33     const SkPMColor4f& bias10_11() const { return fBias10_11; }
bias12_13()34     const SkPMColor4f& bias12_13() const { return fBias12_13; }
bias14_15()35     const SkPMColor4f& bias14_15() const { return fBias14_15; }
thresholds1_7()36     const SkRect& thresholds1_7() const { return fThresholds1_7; }
thresholds9_13()37     const SkRect& thresholds9_13() const { return fThresholds9_13; }
38 
39     static std::unique_ptr<GrFragmentProcessor> Make(const SkPMColor4f* colors,
40                                                      const SkScalar* positions,
41                                                      int count);
42     GrUnrolledBinaryGradientColorizer(const GrUnrolledBinaryGradientColorizer& src);
43     std::unique_ptr<GrFragmentProcessor> clone() const override;
name()44     const char* name() const override { return "UnrolledBinaryGradientColorizer"; }
45 
46 private:
GrUnrolledBinaryGradientColorizer(int32_t intervalCount,SkPMColor4f scale0_1,SkPMColor4f scale2_3,SkPMColor4f scale4_5,SkPMColor4f scale6_7,SkPMColor4f scale8_9,SkPMColor4f scale10_11,SkPMColor4f scale12_13,SkPMColor4f scale14_15,SkPMColor4f bias0_1,SkPMColor4f bias2_3,SkPMColor4f bias4_5,SkPMColor4f bias6_7,SkPMColor4f bias8_9,SkPMColor4f bias10_11,SkPMColor4f bias12_13,SkPMColor4f bias14_15,SkRect thresholds1_7,SkRect thresholds9_13)47     GrUnrolledBinaryGradientColorizer(int32_t intervalCount,
48                                       SkPMColor4f scale0_1,
49                                       SkPMColor4f scale2_3,
50                                       SkPMColor4f scale4_5,
51                                       SkPMColor4f scale6_7,
52                                       SkPMColor4f scale8_9,
53                                       SkPMColor4f scale10_11,
54                                       SkPMColor4f scale12_13,
55                                       SkPMColor4f scale14_15,
56                                       SkPMColor4f bias0_1,
57                                       SkPMColor4f bias2_3,
58                                       SkPMColor4f bias4_5,
59                                       SkPMColor4f bias6_7,
60                                       SkPMColor4f bias8_9,
61                                       SkPMColor4f bias10_11,
62                                       SkPMColor4f bias12_13,
63                                       SkPMColor4f bias14_15,
64                                       SkRect thresholds1_7,
65                                       SkRect thresholds9_13)
66             : INHERITED(kGrUnrolledBinaryGradientColorizer_ClassID, kNone_OptimizationFlags)
67             , fIntervalCount(intervalCount)
68             , fScale0_1(scale0_1)
69             , fScale2_3(scale2_3)
70             , fScale4_5(scale4_5)
71             , fScale6_7(scale6_7)
72             , fScale8_9(scale8_9)
73             , fScale10_11(scale10_11)
74             , fScale12_13(scale12_13)
75             , fScale14_15(scale14_15)
76             , fBias0_1(bias0_1)
77             , fBias2_3(bias2_3)
78             , fBias4_5(bias4_5)
79             , fBias6_7(bias6_7)
80             , fBias8_9(bias8_9)
81             , fBias10_11(bias10_11)
82             , fBias12_13(bias12_13)
83             , fBias14_15(bias14_15)
84             , fThresholds1_7(thresholds1_7)
85             , fThresholds9_13(thresholds9_13) {}
86     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
87     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
88     bool onIsEqual(const GrFragmentProcessor&) const override;
89     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
90     int32_t fIntervalCount;
91     SkPMColor4f fScale0_1;
92     SkPMColor4f fScale2_3;
93     SkPMColor4f fScale4_5;
94     SkPMColor4f fScale6_7;
95     SkPMColor4f fScale8_9;
96     SkPMColor4f fScale10_11;
97     SkPMColor4f fScale12_13;
98     SkPMColor4f fScale14_15;
99     SkPMColor4f fBias0_1;
100     SkPMColor4f fBias2_3;
101     SkPMColor4f fBias4_5;
102     SkPMColor4f fBias6_7;
103     SkPMColor4f fBias8_9;
104     SkPMColor4f fBias10_11;
105     SkPMColor4f fBias12_13;
106     SkPMColor4f fBias14_15;
107     SkRect fThresholds1_7;
108     SkRect fThresholds9_13;
109     typedef GrFragmentProcessor INHERITED;
110 };
111 #endif
112