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