• 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 GrComposeLerpRedEffect.fp; do not modify.
10  **************************************************************************************************/
11 #ifndef GrComposeLerpRedEffect_DEFINED
12 #define GrComposeLerpRedEffect_DEFINED
13 #include "include/core/SkTypes.h"
14 
15 #include "src/gpu/GrCoordTransform.h"
16 #include "src/gpu/GrFragmentProcessor.h"
17 class GrComposeLerpRedEffect : public GrFragmentProcessor {
18 public:
Make(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,std::unique_ptr<GrFragmentProcessor> lerp)19     static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1,
20                                                      std::unique_ptr<GrFragmentProcessor> child2,
21                                                      std::unique_ptr<GrFragmentProcessor> lerp) {
22         return std::unique_ptr<GrFragmentProcessor>(
23                 new GrComposeLerpRedEffect(std::move(child1), std::move(child2), std::move(lerp)));
24     }
25     GrComposeLerpRedEffect(const GrComposeLerpRedEffect& src);
26     std::unique_ptr<GrFragmentProcessor> clone() const override;
name()27     const char* name() const override { return "ComposeLerpRedEffect"; }
28     int child1_index = -1;
29     int child2_index = -1;
30     int lerp_index = -1;
31 
32 private:
GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1,std::unique_ptr<GrFragmentProcessor> child2,std::unique_ptr<GrFragmentProcessor> lerp)33     GrComposeLerpRedEffect(std::unique_ptr<GrFragmentProcessor> child1,
34                            std::unique_ptr<GrFragmentProcessor> child2,
35                            std::unique_ptr<GrFragmentProcessor> lerp)
36             : INHERITED(kGrComposeLerpRedEffect_ClassID, kNone_OptimizationFlags) {
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         SkASSERT(lerp);
46         lerp_index = this->numChildProcessors();
47         this->registerChildProcessor(std::move(lerp));
48     }
49     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
50     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
51     bool onIsEqual(const GrFragmentProcessor&) const override;
52     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
53     typedef GrFragmentProcessor INHERITED;
54 };
55 #endif
56