• 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 GrCircleBlurFragmentProcessor.fp; do not modify.
10  **************************************************************************************************/
11 #ifndef GrCircleBlurFragmentProcessor_DEFINED
12 #define GrCircleBlurFragmentProcessor_DEFINED
13 #include "include/core/SkTypes.h"
14 
15 #include "src/gpu/GrCoordTransform.h"
16 #include "src/gpu/GrFragmentProcessor.h"
17 class GrCircleBlurFragmentProcessor : public GrFragmentProcessor {
18 public:
19     static std::unique_ptr<GrFragmentProcessor> Make(GrProxyProvider*, const SkRect& circle,
20                                                      float sigma);
21     GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src);
22     std::unique_ptr<GrFragmentProcessor> clone() const override;
name()23     const char* name() const override { return "CircleBlurFragmentProcessor"; }
24     SkRect circleRect;
25     float textureRadius;
26     float solidRadius;
27     TextureSampler blurProfileSampler;
28 
29 private:
GrCircleBlurFragmentProcessor(SkRect circleRect,float textureRadius,float solidRadius,sk_sp<GrTextureProxy> blurProfileSampler)30     GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius,
31                                   sk_sp<GrTextureProxy> blurProfileSampler)
32             : INHERITED(kGrCircleBlurFragmentProcessor_ClassID,
33                         (OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
34             , circleRect(circleRect)
35             , textureRadius(textureRadius)
36             , solidRadius(solidRadius)
37             , blurProfileSampler(std::move(blurProfileSampler)) {
38         this->setTextureSamplerCnt(1);
39     }
40     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
41     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
42     bool onIsEqual(const GrFragmentProcessor&) const override;
43     const TextureSampler& onTextureSampler(int) const override;
44     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
45     typedef GrFragmentProcessor INHERITED;
46 };
47 #endif
48