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 |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 13 | #include "include/core/SkTypes.h" |
| 14 | |
| 15 | #include "src/gpu/GrCoordTransform.h" |
| 16 | #include "src/gpu/GrFragmentProcessor.h" |
Ethan Nicholas | ff4fb33 | 2019-04-09 16:28:19 -0400 | [diff] [blame] | 17 | class GrComposeLerpEffect : public GrFragmentProcessor { |
| 18 | public: |
| 19 | static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1, |
| 20 | std::unique_ptr<GrFragmentProcessor> child2, |
| 21 | float weight) { |
| 22 | return std::unique_ptr<GrFragmentProcessor>( |
| 23 | new GrComposeLerpEffect(std::move(child1), std::move(child2), weight)); |
| 24 | } |
| 25 | GrComposeLerpEffect(const GrComposeLerpEffect& src); |
| 26 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
| 27 | const char* name() const override { return "ComposeLerpEffect"; } |
| 28 | int child1_index = -1; |
| 29 | int child2_index = -1; |
| 30 | float weight; |
| 31 | |
| 32 | private: |
| 33 | GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1, |
| 34 | std::unique_ptr<GrFragmentProcessor> child2, float weight) |
| 35 | : INHERITED(kGrComposeLerpEffect_ClassID, kNone_OptimizationFlags), weight(weight) { |
| 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 | } |
| 45 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 46 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
| 47 | bool onIsEqual(const GrFragmentProcessor&) const override; |
| 48 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
| 49 | typedef GrFragmentProcessor INHERITED; |
| 50 | }; |
| 51 | #endif |