Chromium Code Reviews| Index: src/effects/SkAlphaThresholdFilter.cpp |
| diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp |
| index 774092c2df7ddcd8e61e9cf701dc8f426cb633a0..006b9e60521630da1ff377670a273ec9c472a32b 100644 |
| --- a/src/effects/SkAlphaThresholdFilter.cpp |
| +++ b/src/effects/SkAlphaThresholdFilter.cpp |
| @@ -62,11 +62,13 @@ SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region, |
| class AlphaThresholdEffect : public GrFragmentProcessor { |
| public: |
| - static GrFragmentProcessor* Create(GrTexture* texture, |
| + static GrFragmentProcessor* Create(GrShaderDataManager* shaderDataManager, |
| + GrTexture* texture, |
| GrTexture* maskTexture, |
| float innerThreshold, |
| float outerThreshold) { |
| - return SkNEW_ARGS(AlphaThresholdEffect, (texture, |
| + return SkNEW_ARGS(AlphaThresholdEffect, (shaderDataManager, |
| + texture, |
| maskTexture, |
| innerThreshold, |
| outerThreshold)); |
| @@ -84,7 +86,8 @@ public: |
| GrGLFragmentProcessor* createGLInstance() const override; |
| private: |
| - AlphaThresholdEffect(GrTexture* texture, |
| + AlphaThresholdEffect(GrShaderDataManager*, |
| + GrTexture* texture, |
| GrTexture* maskTexture, |
| float innerThreshold, |
| float outerThreshold) |
| @@ -212,7 +215,9 @@ GrFragmentProcessor* AlphaThresholdEffect::TestCreate(SkRandom* random, |
| GrTexture* maskTex = textures[GrProcessorUnitTest::kAlphaTextureIdx]; |
| float inner_thresh = random->nextUScalar1(); |
| float outer_thresh = random->nextUScalar1(); |
|
robertphillips
2015/07/08 16:24:50
Will this work or do we need to pass one in ?
|
| - return AlphaThresholdEffect::Create(bmpTex, maskTex, inner_thresh, outer_thresh); |
| + GrShaderDataManager shaderDataManager; |
| + return AlphaThresholdEffect::Create(&shaderDataManager, bmpTex, maskTex, inner_thresh, |
| + outer_thresh); |
| } |
| /////////////////////////////////////////////////////////////////////////////// |
| @@ -265,7 +270,7 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region, |
| #if SK_SUPPORT_GPU |
| bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, |
| - GrShaderDataManager*, |
| + GrShaderDataManager* shaderDataManager, |
| GrTexture* texture, |
| const SkMatrix& in_matrix, |
| const SkIRect&) const { |
| @@ -303,7 +308,8 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, |
| } |
| } |
| - *fp = AlphaThresholdEffect::Create(texture, |
| + *fp = AlphaThresholdEffect::Create(shaderDataManager, |
| + texture, |
| maskTexture, |
| fInnerThreshold, |
| fOuterThreshold); |