diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-15 12:07:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-15 17:18:19 +0000 |
commit | fbcef6eb8abad142daf45418516550f7635b4a52 (patch) | |
tree | 1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /src/gpu/effects/GrDistanceFieldGeoProc.h | |
parent | baaf439eb5d08097d794f13800e5bf7ce8885f95 (diff) |
Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in:
SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*
Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrDistanceFieldGeoProc.h')
-rw-r--r-- | src/gpu/effects/GrDistanceFieldGeoProc.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h index 1384d2fc63..c0cc2e9e13 100644 --- a/src/gpu/effects/GrDistanceFieldGeoProc.h +++ b/src/gpu/effects/GrDistanceFieldGeoProc.h @@ -49,23 +49,21 @@ enum GrDistanceFieldEffectFlags { class GrDistanceFieldA8TextGeoProc : public GrGeometryProcessor { public: #ifdef SK_GAMMA_APPLY_TO_A8 - static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, - GrColor color, const SkMatrix& viewMatrix, + static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, float lum, uint32_t flags, bool usesLocalCoords) { return sk_sp<GrGeometryProcessor>( - new GrDistanceFieldA8TextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy), + new GrDistanceFieldA8TextGeoProc(color, viewMatrix, std::move(proxy), params, lum, flags, usesLocalCoords)); } #else - static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, - GrColor color, const SkMatrix& viewMatrix, + static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, uint32_t flags, bool usesLocalCoords) { return sk_sp<GrGeometryProcessor>( - new GrDistanceFieldA8TextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy), + new GrDistanceFieldA8TextGeoProc(color, viewMatrix, std::move(proxy), params, flags, usesLocalCoords)); } #endif @@ -90,7 +88,7 @@ public: GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override; private: - GrDistanceFieldA8TextGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix, + GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, #ifdef SK_GAMMA_APPLY_TO_A8 float distanceAdjust, @@ -123,12 +121,12 @@ private: */ class GrDistanceFieldPathGeoProc : public GrGeometryProcessor { public: - static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color, + static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, uint32_t flags, bool usesLocalCoords) { return sk_sp<GrGeometryProcessor>( - new GrDistanceFieldPathGeoProc(resourceProvider, color, viewMatrix, std::move(proxy), + new GrDistanceFieldPathGeoProc(color, viewMatrix, std::move(proxy), params, flags, usesLocalCoords)); } @@ -149,7 +147,7 @@ public: GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override; private: - GrDistanceFieldPathGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix, + GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy>, const GrSamplerParams&, uint32_t flags, bool usesLocalCoords); @@ -190,14 +188,15 @@ public: } }; - static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color, + static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, - DistanceAdjust distanceAdjust, uint32_t flags, + DistanceAdjust distanceAdjust, + uint32_t flags, bool usesLocalCoords) { return sk_sp<GrGeometryProcessor>( - new GrDistanceFieldLCDTextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy), + new GrDistanceFieldLCDTextGeoProc(color, viewMatrix, std::move(proxy), params, distanceAdjust, flags, usesLocalCoords)); } @@ -220,7 +219,7 @@ public: GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override; private: - GrDistanceFieldLCDTextGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix, + GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params, DistanceAdjust wa, uint32_t flags, bool usesLocalCoords); |