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 15 #include "src/gpu/GrCoordTransform.h" 16 #include "src/gpu/GrFragmentProcessor.h" 17 class GrSingleIntervalGradientColorizer : public GrFragmentProcessor { 18 public: Make(SkPMColor4f start,SkPMColor4f end)19 static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f start, SkPMColor4f end) { 20 return std::unique_ptr<GrFragmentProcessor>( 21 new GrSingleIntervalGradientColorizer(start, end)); 22 } 23 GrSingleIntervalGradientColorizer(const GrSingleIntervalGradientColorizer& src); 24 std::unique_ptr<GrFragmentProcessor> clone() const override; name()25 const char* name() const override { return "SingleIntervalGradientColorizer"; } 26 SkPMColor4f start; 27 SkPMColor4f end; 28 29 private: GrSingleIntervalGradientColorizer(SkPMColor4f start,SkPMColor4f end)30 GrSingleIntervalGradientColorizer(SkPMColor4f start, SkPMColor4f end) 31 : INHERITED(kGrSingleIntervalGradientColorizer_ClassID, kNone_OptimizationFlags) 32 , start(start) 33 , end(end) {} 34 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 35 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; 36 bool onIsEqual(const GrFragmentProcessor&) const override; 37 GR_DECLARE_FRAGMENT_PROCESSOR_TEST 38 typedef GrFragmentProcessor INHERITED; 39 }; 40 #endif 41