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 GrComposeLerpEffect.fp; do not modify. |
| 10 | **************************************************************************************************/ |
| 11 | #ifndef GrComposeLerpEffect_DEFINED |
| 12 | #define GrComposeLerpEffect_DEFINED |
| 13 | #include "SkTypes.h" |
| 14 | #include "GrFragmentProcessor.h" |
| 15 | #include "GrCoordTransform.h" |
| 16 | class GrComposeLerpEffect : public GrFragmentProcessor { |
| 17 | public: |
| 18 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1, |
| 19 | std::unique_ptr<GrFragmentProcessor> child2, |
| 20 | float weight) { |
| 21 | return std::unique_ptr<GrFragmentProcessor>( |
| 22 | new GrComposeLerpEffect(std::move(child1), std::move(child2), weight)); |
| 23 | } |
| 24 | GrComposeLerpEffect(const GrComposeLerpEffect& src); |
| 25 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
| 26 | const char* name() const override { return "ComposeLerpEffect"; } |
| 27 | int child1_index = -1; |
| 28 | int child2_index = -1; |
| 29 | float weight; |
| 30 | |
| 31 | private: |
| 32 | GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1, |
| 33 | std::unique_ptr<GrFragmentProcessor> child2, float weight) |
| 34 | : INHERITED(kGrComposeLerpEffect_ClassID, kNone_OptimizationFlags), weight(weight) { |
| 35 | if (child1) { |
| 36 | child1_index = this->numChildProcessors(); |
| 37 | this->registerChildProcessor(std::move(child1)); |
| 38 | } |
| 39 | if (child2) { |
| 40 | child2_index = this->numChildProcessors(); |
| 41 | this->registerChildProcessor(std::move(child2)); |
| 42 | } |
| 43 | } |
| 44 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 45 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
| 46 | bool onIsEqual(const GrFragmentProcessor&) const override; |
| 47 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
| 48 | typedef GrFragmentProcessor INHERITED; |
| 49 | }; |
| 50 | #endif |