Index: src/effects/GrCircleBlurFragmentProcessor.h |
diff --git a/src/effects/GrCircleBlurFragmentProcessor.h b/src/effects/GrCircleBlurFragmentProcessor.h |
index 89c067c43b10a4786c27bbc47cdb3412e670f814..7754a2eda482644139c058ce543b75374b3a5f3d 100644 |
--- a/src/effects/GrCircleBlurFragmentProcessor.h |
+++ b/src/effects/GrCircleBlurFragmentProcessor.h |
@@ -28,29 +28,14 @@ public: |
SkString dumpInfo() const override { |
SkString str; |
- str.appendf("Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], Sigma %.2f, solidR: %.2f, " |
- "textureR: %.2f", |
+ str.appendf("Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], solidR: %.2f, textureR: %.2f", |
fCircle.fLeft, fCircle.fTop, fCircle.fRight, fCircle.fBottom, |
- fSigma, fSolidRadius, fTextureRadius); |
+ fSolidRadius, fTextureRadius); |
return str; |
} |
static sk_sp<GrFragmentProcessor> Make(GrTextureProvider*textureProvider, |
- const SkRect& circle, float sigma) { |
- float solidRadius; |
- float textureRadius; |
- |
- SkAutoTUnref<GrTexture> profile(CreateCircleBlurProfileTexture(textureProvider, |
- circle, |
- sigma, |
- &solidRadius, |
- &textureRadius)); |
- if (!profile) { |
- return nullptr; |
- } |
- return sk_sp<GrFragmentProcessor>( |
- new GrCircleBlurFragmentProcessor(circle, sigma, solidRadius, textureRadius, profile)); |
- } |
+ const SkRect& circle, float sigma); |
private: |
// This nested GLSL processor implementation is defined in the cpp file. |
@@ -61,8 +46,8 @@ private: |
* The x texture coord should map from 0 to 1 across the radius range of solidRadius to |
* solidRadius + textureRadius. |
*/ |
- GrCircleBlurFragmentProcessor(const SkRect& circle, float sigma, |
- float solidRadius, float textureRadius, GrTexture* blurProfile); |
+ GrCircleBlurFragmentProcessor(const SkRect& circle, float textureRadius, float innerRadius, |
+ GrTexture* blurProfile); |
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
@@ -70,21 +55,14 @@ private: |
bool onIsEqual(const GrFragmentProcessor& other) const override { |
const GrCircleBlurFragmentProcessor& cbfp = other.cast<GrCircleBlurFragmentProcessor>(); |
- // fOffset is computed from the circle width and the sigma |
- return this->fCircle == cbfp.fCircle && fSigma == cbfp.fSigma; |
+ return fCircle == cbfp.fCircle && fSolidRadius == cbfp.fSolidRadius && |
+ fTextureRadius == cbfp.fTextureRadius; |
} |
void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
- static GrTexture* CreateCircleBlurProfileTexture(GrTextureProvider*, |
- const SkRect& circle, |
- float sigma, |
- float* solidRadius, |
- float* textureRadius); |
- |
SkRect fCircle; |
- float fSigma; |
- float fSolidRadius; |
+ SkScalar fSolidRadius; |
float fTextureRadius; |
GrTextureAccess fBlurProfileAccess; |