diff options
author | 2015-10-06 08:40:50 -0700 | |
---|---|---|
committer | 2015-10-06 08:40:51 -0700 | |
commit | 4a339529612a43871d021877e58698e067d6c4cd (patch) | |
tree | a46e5271f68b194f4351271c1faa65568c9606fd /src/effects/SkAlphaThresholdFilter.cpp | |
parent | e1f829699958b673dfe196c80d17a55d18d0fc4b (diff) |
Bye bye processor data manager.
Review URL: https://codereview.chromium.org/1388113002
Diffstat (limited to 'src/effects/SkAlphaThresholdFilter.cpp')
-rw-r--r-- | src/effects/SkAlphaThresholdFilter.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index 066a91f9c5..95860acec9 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -28,8 +28,8 @@ protected: bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* result, SkIPoint* offset) const override; #if SK_SUPPORT_GPU - bool asFragmentProcessor(GrFragmentProcessor**, GrProcessorDataManager*, GrTexture*, - const SkMatrix&, const SkIRect& bounds) const override; + bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix&, + const SkIRect& bounds) const override; #endif private: @@ -62,13 +62,11 @@ SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region, class AlphaThresholdEffect : public GrFragmentProcessor { public: - static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, - GrTexture* texture, + static GrFragmentProcessor* Create(GrTexture* texture, GrTexture* maskTexture, float innerThreshold, float outerThreshold) { - return new AlphaThresholdEffect(procDataManager, texture, maskTexture, innerThreshold, - outerThreshold); + return new AlphaThresholdEffect(texture, maskTexture, innerThreshold, outerThreshold); } virtual ~AlphaThresholdEffect() {}; @@ -79,8 +77,7 @@ public: float outerThreshold() const { return fOuterThreshold; } private: - AlphaThresholdEffect(GrProcessorDataManager*, - GrTexture* texture, + AlphaThresholdEffect(GrTexture* texture, GrTexture* maskTexture, float innerThreshold, float outerThreshold) @@ -200,8 +197,7 @@ const GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData* GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx]; float innerThresh = d->fRandom->nextUScalar1(); float outerThresh = d->fRandom->nextUScalar1(); - return AlphaThresholdEffect::Create(d->fProcDataManager, bmpTex, maskTex, innerThresh, - outerThresh); + return AlphaThresholdEffect::Create(bmpTex, maskTex, innerThresh, outerThresh); } /////////////////////////////////////////////////////////////////////////////// @@ -254,7 +250,6 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region, #if SK_SUPPORT_GPU bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, - GrProcessorDataManager* procDataManager, GrTexture* texture, const SkMatrix& in_matrix, const SkIRect&) const { @@ -292,8 +287,7 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp, } } - *fp = AlphaThresholdEffect::Create(procDataManager, - texture, + *fp = AlphaThresholdEffect::Create(texture, maskTexture, fInnerThreshold, fOuterThreshold); |