1 /* 2 * Copyright 2019 Google LLC. 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 GrComposeLerpRedEffect.fp; do not modify. 10 **************************************************************************************************/ 11 #ifndef GrComposeLerpRedEffect_DEFINED 12 #define GrComposeLerpRedEffect_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 GrComposeLerpRedEffect : public GrFragmentProcessor { 19 public: Make(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,std::unique_ptr<GrFragmentProcessor> lerp)20 static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1, 21 std::unique_ptr<GrFragmentProcessor> child2, 22 std::unique_ptr<GrFragmentProcessor> lerp) { 23 return std::unique_ptr<GrFragmentProcessor>( 24 new GrComposeLerpRedEffect(std::move(child1), std::move(child2), std::move(lerp))); 25 } 26 GrComposeLerpRedEffect(const GrComposeLerpRedEffect& src); 27 std::unique_ptr<GrFragmentProcessor> clone() const override; name()28 const char* name() const override { return "ComposeLerpRedEffect"; } 29 int child1_index = -1; 30 int child2_index = -1; 31 int lerp_index = -1; 32 33 private: GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,std::unique_ptr<GrFragmentProcessor> lerp)34 GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1, 35 std::unique_ptr<GrFragmentProcessor> child2, 36 std::unique_ptr<GrFragmentProcessor> lerp) 37 : INHERITED(kGrComposeLerpRedEffect_ClassID, kNone_OptimizationFlags) { 38 if (child1) { 39 child1_index = this->numChildProcessors(); 40 this->registerChildProcessor(std::move(child1)); 41 } 42 if (child2) { 43 child2_index = this->numChildProcessors(); 44 this->registerChildProcessor(std::move(child2)); 45 } 46 SkASSERT(lerp); 47 lerp_index = this->numChildProcessors(); 48 this->registerChildProcessor(std::move(lerp)); 49 } 50 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; 51 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; 52 bool onIsEqual(const GrFragmentProcessor&) const override; 53 GR_DECLARE_FRAGMENT_PROCESSOR_TEST 54 typedef GrFragmentProcessor INHERITED; 55 }; 56 #endif 57