| 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 "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 GrComposeLerpEffect : public GrFragmentProcessor { |
| 19 | public: |
| 20 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1, |
| 21 | std::unique_ptr<GrFragmentProcessor> child2, |
| 22 | float weight) { |
| 23 | return std::unique_ptr<GrFragmentProcessor>( |
| 24 | new GrComposeLerpEffect(std::move(child1), std::move(child2), weight)); |
| 25 | } |
| 26 | GrComposeLerpEffect(const GrComposeLerpEffect& src); |
| 27 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
| 28 | const char* name() const override { return "ComposeLerpEffect"; } |
| 29 | int child1_index = -1; |
| 30 | int child2_index = -1; |
| 31 | float weight; |
| 32 | |
| 33 | private: |
| 34 | GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1, |
| 35 | std::unique_ptr<GrFragmentProcessor> child2, |
| 36 | float weight) |
| 37 | : INHERITED(kGrComposeLerpEffect_ClassID, kNone_OptimizationFlags), weight(weight) { |
| 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 | } |
| 47 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 48 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
| 49 | bool onIsEqual(const GrFragmentProcessor&) const override; |
| 50 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
| 51 | typedef GrFragmentProcessor INHERITED; |
| 52 | }; |
| 53 | #endif |
| 54 |