Ethan Nicholas | ff4fb33 | 2019-04-09 16:28:19 -0400 | [diff] [blame^] | 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 "SkTypes.h" |
| 14 | #include "GrFragmentProcessor.h" |
| 15 | #include "GrCoordTransform.h" |
| 16 | class GrComposeLerpRedEffect : public GrFragmentProcessor { |
| 17 | public: |
| 18 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1, |
| 19 | std::unique_ptr<GrFragmentProcessor> child2, |
| 20 | std::unique_ptr<GrFragmentProcessor> lerp) { |
| 21 | return std::unique_ptr<GrFragmentProcessor>( |
| 22 | new GrComposeLerpRedEffect(std::move(child1), std::move(child2), std::move(lerp))); |
| 23 | } |
| 24 | GrComposeLerpRedEffect(const GrComposeLerpRedEffect& src); |
| 25 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
| 26 | const char* name() const override { return "ComposeLerpRedEffect"; } |
| 27 | int child1_index = -1; |
| 28 | int child2_index = -1; |
| 29 | int lerp_index = -1; |
| 30 | |
| 31 | private: |
| 32 | GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1, |
| 33 | std::unique_ptr<GrFragmentProcessor> child2, |
| 34 | std::unique_ptr<GrFragmentProcessor> lerp) |
| 35 | : INHERITED(kGrComposeLerpRedEffect_ClassID, kNone_OptimizationFlags) { |
| 36 | if (child1) { |
| 37 | child1_index = this->numChildProcessors(); |
| 38 | this->registerChildProcessor(std::move(child1)); |
| 39 | } |
| 40 | if (child2) { |
| 41 | child2_index = this->numChildProcessors(); |
| 42 | this->registerChildProcessor(std::move(child2)); |
| 43 | } |
| 44 | SkASSERT(lerp); |
| 45 | lerp_index = this->numChildProcessors(); |
| 46 | this->registerChildProcessor(std::move(lerp)); |
| 47 | } |
| 48 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 49 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
| 50 | bool onIsEqual(const GrFragmentProcessor&) const override; |
| 51 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
| 52 | typedef GrFragmentProcessor INHERITED; |
| 53 | }; |
| 54 | #endif |