• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:
Make(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,float weight)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;
name()28     const char* name() const override { return "ComposeLerpEffect"; }
29     int child1_index = -1;
30     int child2_index = -1;
31     float weight;
32 
33 private:
GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,float weight)34     GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1,
35                         std::unique_ptr<GrFragmentProcessor> child2, float weight)
36             : INHERITED(kGrComposeLerpEffect_ClassID, kNone_OptimizationFlags), weight(weight) {
37         if (child1) {
38             child1_index = this->numChildProcessors();
39             this->registerChildProcessor(std::move(child1));
40         }
41         if (child2) {
42             child2_index = this->numChildProcessors();
43             this->registerChildProcessor(std::move(child2));
44         }
45     }
46     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
47     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
48     bool onIsEqual(const GrFragmentProcessor&) const override;
49     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
50     typedef GrFragmentProcessor INHERITED;
51 };
52 #endif
53