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 "include/core/SkTypes.h"
14#include "include/core/SkM44.h"
15
16#include "src/gpu/GrCoordTransform.h"
17#include "src/gpu/GrFragmentProcessor.h"
18class GrUnrolledBinaryGradientColorizer : public GrFragmentProcessor {
19public:
20 static const int kMaxColorCount = 16;
21
22 static std::unique_ptr<GrFragmentProcessor> Make(const SkPMColor4f* colors,
23 const SkScalar* positions,
24 int count);
25 GrUnrolledBinaryGradientColorizer(const GrUnrolledBinaryGradientColorizer& src);
26 std::unique_ptr<GrFragmentProcessor> clone() const override;
27 const char* name() const override { return "UnrolledBinaryGradientColorizer"; }
28 int32_t intervalCount;
29 SkPMColor4f scale0_1;
30 SkPMColor4f scale2_3;
31 SkPMColor4f scale4_5;
32 SkPMColor4f scale6_7;
33 SkPMColor4f scale8_9;
34 SkPMColor4f scale10_11;
35 SkPMColor4f scale12_13;
36 SkPMColor4f scale14_15;
37 SkPMColor4f bias0_1;
38 SkPMColor4f bias2_3;
39 SkPMColor4f bias4_5;
40 SkPMColor4f bias6_7;
41 SkPMColor4f bias8_9;
42 SkPMColor4f bias10_11;
43 SkPMColor4f bias12_13;
44 SkPMColor4f bias14_15;
45 SkRect thresholds1_7;
46 SkRect thresholds9_13;
47
48private:
49 GrUnrolledBinaryGradientColorizer(int32_t intervalCount,
50 SkPMColor4f scale0_1,
51 SkPMColor4f scale2_3,
52 SkPMColor4f scale4_5,
53 SkPMColor4f scale6_7,
54 SkPMColor4f scale8_9,
55 SkPMColor4f scale10_11,
56 SkPMColor4f scale12_13,
57 SkPMColor4f scale14_15,
58 SkPMColor4f bias0_1,
59 SkPMColor4f bias2_3,
60 SkPMColor4f bias4_5,
61 SkPMColor4f bias6_7,
62 SkPMColor4f bias8_9,
63 SkPMColor4f bias10_11,
64 SkPMColor4f bias12_13,
65 SkPMColor4f bias14_15,
66 SkRect thresholds1_7,
67 SkRect thresholds9_13)
68 : INHERITED(kGrUnrolledBinaryGradientColorizer_ClassID, kNone_OptimizationFlags)
69 , intervalCount(intervalCount)
70 , scale0_1(scale0_1)
71 , scale2_3(scale2_3)
72 , scale4_5(scale4_5)
73 , scale6_7(scale6_7)
74 , scale8_9(scale8_9)
75 , scale10_11(scale10_11)
76 , scale12_13(scale12_13)
77 , scale14_15(scale14_15)
78 , bias0_1(bias0_1)
79 , bias2_3(bias2_3)
80 , bias4_5(bias4_5)
81 , bias6_7(bias6_7)
82 , bias8_9(bias8_9)
83 , bias10_11(bias10_11)
84 , bias12_13(bias12_13)
85 , bias14_15(bias14_15)
86 , thresholds1_7(thresholds1_7)
87 , thresholds9_13(thresholds9_13) {}
88 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
89 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
90 bool onIsEqual(const GrFragmentProcessor&) const override;
91 GR_DECLARE_FRAGMENT_PROCESSOR_TEST
92 typedef GrFragmentProcessor INHERITED;
93};
94#endif
95