• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 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 "SkTypes.h"
14 #if SK_SUPPORT_GPU
15 #include "GrFragmentProcessor.h"
16 #include "GrCoordTransform.h"
17 #include "GrColorSpaceXform.h"
18 #include "effects/GrProxyMove.h"
19 class GrCircleBlurFragmentProcessor : public GrFragmentProcessor {
20 public:
circleRect()21     SkRect circleRect() const { return fCircleRect; }
textureRadius()22     float textureRadius() const { return fTextureRadius; }
solidRadius()23     float solidRadius() const { return fSolidRadius; }
24 
25     static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
26                                            const SkRect& circle, float sigma);
name()27     const char* name() const override { return "CircleBlurFragmentProcessor"; }
28 
29 private:
GrCircleBlurFragmentProcessor(SkRect circleRect,float textureRadius,float solidRadius,sk_sp<GrTextureProxy> blurProfileSampler,GrResourceProvider * resourceProvider)30     GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius,
31                                   sk_sp<GrTextureProxy> blurProfileSampler,
32                                   GrResourceProvider* resourceProvider)
33             : INHERITED((OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
34             , fCircleRect(circleRect)
35             , fTextureRadius(textureRadius)
36             , fSolidRadius(solidRadius)
37             , fBlurProfileSampler(std::move(blurProfileSampler)) {
38         this->addTextureSampler(&fBlurProfileSampler);
39         this->initClassID<GrCircleBlurFragmentProcessor>();
40     }
41     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
42     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
43     bool onIsEqual(const GrFragmentProcessor&) const override;
44     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
45     SkRect fCircleRect;
46     float fTextureRadius;
47     float fSolidRadius;
48     TextureSampler fBlurProfileSampler;
49     typedef GrFragmentProcessor INHERITED;
50 };
51 #endif
52 #endif
53