• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2018 Google Inc.
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 GrRadialGradientLayout.fp; do not modify.
10  **************************************************************************************************/
11 #ifndef GrRadialGradientLayout_DEFINED
12 #define GrRadialGradientLayout_DEFINED
13 #include "include/core/SkTypes.h"
14 
15 #include "src/gpu/gradients/GrGradientShader.h"
16 #include "src/shaders/gradients/SkRadialGradient.h"
17 
18 #include "src/gpu/GrCoordTransform.h"
19 #include "src/gpu/GrFragmentProcessor.h"
20 class GrRadialGradientLayout : public GrFragmentProcessor {
21 public:
22     static std::unique_ptr<GrFragmentProcessor> Make(const SkRadialGradient& gradient,
23                                                      const GrFPArgs& args);
24     GrRadialGradientLayout(const GrRadialGradientLayout& src);
25     std::unique_ptr<GrFragmentProcessor> clone() const override;
name()26     const char* name() const override { return "RadialGradientLayout"; }
27     GrCoordTransform fCoordTransform0;
28     SkMatrix44 gradientMatrix;
29 
30 private:
GrRadialGradientLayout(SkMatrix44 gradientMatrix)31     GrRadialGradientLayout(SkMatrix44 gradientMatrix)
32             : INHERITED(kGrRadialGradientLayout_ClassID,
33                         (OptimizationFlags)kPreservesOpaqueInput_OptimizationFlag)
34             , fCoordTransform0(gradientMatrix)
35             , gradientMatrix(gradientMatrix) {
36         this->addCoordTransform(&fCoordTransform0);
37     }
38     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
39     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
40     bool onIsEqual(const GrFragmentProcessor&) const override;
41     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
42     typedef GrFragmentProcessor INHERITED;
43 };
44 #endif
45