diff options
author | 2017-06-15 12:07:18 -0400 | |
---|---|---|
committer | 2017-06-15 17:18:19 +0000 | |
commit | fbcef6eb8abad142daf45418516550f7635b4a52 (patch) | |
tree | 1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /gm | |
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 'gm')
-rw-r--r-- | gm/texdata.cpp | 3 | ||||
-rw-r--r-- | gm/texturedomaineffect.cpp | 2 | ||||
-rw-r--r-- | gm/windowrectangles.cpp | 10 | ||||
-rw-r--r-- | gm/yuvtorgbeffect.cpp | 6 |
4 files changed, 9 insertions, 12 deletions
diff --git a/gm/texdata.cpp b/gm/texdata.cpp index 7bb7173f13..42723e4436 100644 --- a/gm/texdata.cpp +++ b/gm/texdata.cpp @@ -117,8 +117,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) { } else { vm.reset(); } - paint.addColorTextureProcessor(context->resourceProvider(), tContext->asTextureProxyRef(), - nullptr, vm); + paint.addColorTextureProcessor(tContext->asTextureProxyRef(), nullptr, vm); renderTargetContext->drawRect(clip, GrPaint(paint), GrAA::kNo, vm, SkRect::MakeWH(2 * S, 2 * S)); diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp index e54404ef64..3fa835bd65 100644 --- a/gm/texturedomaineffect.cpp +++ b/gm/texturedomaineffect.cpp @@ -123,7 +123,7 @@ protected: grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc)); sk_sp<GrFragmentProcessor> fp( GrTextureDomainEffect::Make( - context->resourceProvider(), proxy, + proxy, nullptr, textureMatrices[tm], GrTextureDomain::MakeTexelDomainForMode(texelDomains[d], mode), mode, GrSamplerParams::kNone_FilterMode)); diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp index 8738c3fd6a..7c054a0db9 100644 --- a/gm/windowrectangles.cpp +++ b/gm/windowrectangles.cpp @@ -12,10 +12,10 @@ #if SK_SUPPORT_GPU # include "GrAppliedClip.h" -# include "GrRenderTargetContext.h" -# include "GrRenderTargetContextPriv.h" # include "GrFixedClip.h" # include "GrReducedClip.h" +# include "GrRenderTargetContext.h" +# include "GrRenderTargetContextPriv.h" # include "GrResourceProvider.h" # include "effects/GrTextureDomain.h" #endif @@ -149,9 +149,9 @@ private: */ class AlphaOnlyClip final : public MaskOnlyClipBase { public: - AlphaOnlyClip(GrResourceProvider* resourceProvider, sk_sp<GrTextureProxy> mask, int x, int y) { + AlphaOnlyClip(sk_sp<GrTextureProxy> mask, int x, int y) { int w = mask->width(), h = mask->height(); - fFP = GrDeviceSpaceTextureDecalFragmentProcessor::Make(resourceProvider, std::move(mask), + fFP = GrDeviceSpaceTextureDecalFragmentProcessor::Make(std::move(mask), SkIRect::MakeWH(w, h), {x, y}); } private: @@ -225,7 +225,7 @@ void WindowRectanglesMaskGM::visualizeAlphaMask(GrContext* ctx, GrRenderTargetCo // Now visualize the alpha mask by drawing a rect over the area where it is defined. The regions // inside window rectangles or outside the scissor should still have the initial checkerboard // intact. (This verifies we didn't spend any time modifying those pixels in the mask.) - AlphaOnlyClip clip(ctx->resourceProvider(), maskRTC->asTextureProxyRef(), x, y); + AlphaOnlyClip clip(maskRTC->asTextureProxyRef(), x, y); rtc->drawRect(clip, std::move(paint), GrAA::kYes, SkMatrix::I(), SkRect::Make(SkIRect::MakeXYWH(x, y, maskRTC->width(), maskRTC->height()))); } diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp index c6effed793..5a9ccddb71 100644 --- a/gm/yuvtorgbeffect.cpp +++ b/gm/yuvtorgbeffect.cpp @@ -119,8 +119,7 @@ protected: for (int i = 0; i < 6; ++i) { sk_sp<GrFragmentProcessor> fp( - GrYUVEffect::MakeYUVToRGB(context->resourceProvider(), - proxy[indices[i][0]], + GrYUVEffect::MakeYUVToRGB(proxy[indices[i][0]], proxy[indices[i][1]], proxy[indices[i][2]], sizes, @@ -249,8 +248,7 @@ protected: GrPaint grPaint; grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc)); sk_sp<GrFragmentProcessor> fp( - GrYUVEffect::MakeYUVToRGB(context->resourceProvider(), - proxy[0], proxy[1], proxy[2], sizes, + GrYUVEffect::MakeYUVToRGB(proxy[0], proxy[1], proxy[2], sizes, static_cast<SkYUVColorSpace>(space), true)); if (fp) { SkMatrix viewMatrix; |