blob: 747c0adbf78900c36ff7b9ffd163d2e50a410016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* This file was autogenerated from GrCircleBlurFragmentProcessor.fp; do not modify.
*/
#ifndef GrCircleBlurFragmentProcessor_DEFINED
#define GrCircleBlurFragmentProcessor_DEFINED
#include "SkTypes.h"
#if SK_SUPPORT_GPU
#include "GrFragmentProcessor.h"
#include "GrCoordTransform.h"
class GrCircleBlurFragmentProcessor : public GrFragmentProcessor {
public:
SkRect circleRect() const { return fCircleRect; }
float textureRadius() const { return fTextureRadius; }
float solidRadius() const { return fSolidRadius; }
static std::unique_ptr<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
const SkRect& circle, float sigma);
GrCircleBlurFragmentProcessor(const GrCircleBlurFragmentProcessor& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;
const char* name() const override { return "CircleBlurFragmentProcessor"; }
private:
GrCircleBlurFragmentProcessor(SkRect circleRect, float textureRadius, float solidRadius,
sk_sp<GrTextureProxy> blurProfileSampler,
GrResourceProvider* resourceProvider)
: INHERITED(kGrCircleBlurFragmentProcessor_ClassID,
(OptimizationFlags)kCompatibleWithCoverageAsAlpha_OptimizationFlag)
, fCircleRect(circleRect)
, fTextureRadius(textureRadius)
, fSolidRadius(solidRadius)
, fBlurProfileSampler(std::move(blurProfileSampler)) {
this->addTextureSampler(&fBlurProfileSampler);
}
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GR_DECLARE_FRAGMENT_PROCESSOR_TEST
SkRect fCircleRect;
float fTextureRadius;
float fSolidRadius;
TextureSampler fBlurProfileSampler;
typedef GrFragmentProcessor INHERITED;
};
#endif
#endif
|