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
14#include "include/core/SkM44.h"
15#include "include/core/SkTypes.h"
16
17#include "src/gpu/GrFragmentProcessor.h"
18
19class GrComposeLerpEffect : public GrFragmentProcessor {
20public:
21 static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child1,
22 std::unique_ptr<GrFragmentProcessor> child2,
23 float weight) {
24 return std::unique_ptr<GrFragmentProcessor>(
25 new GrComposeLerpEffect(std::move(child1), std::move(child2), weight));
26 }
27 GrComposeLerpEffect(const GrComposeLerpEffect& src);
28 std::unique_ptr<GrFragmentProcessor> clone() const override;
29 const char* name() const override { return "ComposeLerpEffect"; }
30 float weight;
31
32private:
33 GrComposeLerpEffect(std::unique_ptr<GrFragmentProcessor> child1,
34 std::unique_ptr<GrFragmentProcessor> child2,
35 float weight)
36 : INHERITED(kGrComposeLerpEffect_ClassID, kNone_OptimizationFlags), weight(weight) {
37 this->registerChild(std::move(child1), SkSL::SampleUsage::PassThrough());
38 this->registerChild(std::move(child2), SkSL::SampleUsage::PassThrough());
39 }
40 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
41 void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
42 bool onIsEqual(const GrFragmentProcessor&) const override;
43#if GR_TEST_UTILS
44 SkString onDumpInfo() const override;
45#endif
46 GR_DECLARE_FRAGMENT_PROCESSOR_TEST
47 typedef GrFragmentProcessor INHERITED;
48};
49#endif
50