Retract GrContext from src/gpu/effects

Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97
Reviewed-on: https://skia-review.googlesource.com/9693
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index a99e532..e2eeeb9 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -256,10 +256,13 @@
 
 static GrColor4f texel_color4f(int i, int j) { return GrColor4f::FromGrColor(texel_color(i, j)); }
 
-void test_draw_op(GrContext* context, GrRenderTargetContext* rtc, sk_sp<GrFragmentProcessor> fp,
+void test_draw_op(GrRenderTargetContext* rtc, sk_sp<GrFragmentProcessor> fp,
                   sk_sp<GrTextureProxy> inputDataProxy) {
+    GrResourceProvider* resourceProvider = rtc->resourceProvider();
+
     GrPaint paint;
-    paint.addColorTextureProcessor(context, std::move(inputDataProxy), nullptr, SkMatrix::I());
+    paint.addColorTextureProcessor(resourceProvider, std::move(inputDataProxy),
+                                   nullptr, SkMatrix::I());
     paint.addColorFragmentProcessor(std::move(fp));
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
     GrPipelineBuilder pb(std::move(paint), GrAAType::kNone);
@@ -337,7 +340,7 @@
                 !fp->compatibleWithCoverageAsAlpha()) {
                 continue;
             }
-            test_draw_op(context, rtc.get(), fp, dataProxy);
+            test_draw_op(rtc.get(), fp, dataProxy);
             memset(rgbaData.get(), 0x0, sizeof(GrColor) * 256 * 256);
             rtc->readPixels(
                     SkImageInfo::Make(256, 256, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index efc11ba..41ee7b3 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -29,7 +29,7 @@
                         GrSamplerParams::kMipMap_FilterMode}) {
         rtContext->clear(nullptr, 0xDDCCBBAA, true);
         sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(
-                                                        context,
+                                                        context->resourceProvider(),
                                                         sk_ref_sp(rectProxy->asTextureProxy()),
                                                         nullptr,
                                                         SkMatrix::I(), filter));
diff --git a/tests/SRGBMipMapTest.cpp b/tests/SRGBMipMapTest.cpp
index 124327a..89a47c9 100644
--- a/tests/SRGBMipMapTest.cpp
+++ b/tests/SRGBMipMapTest.cpp
@@ -136,7 +136,7 @@
     GrPaint paint;
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
     GrSamplerParams mipMapParams(SkShader::kRepeat_TileMode, GrSamplerParams::kMipMap_FilterMode);
-    paint.addColorTextureProcessor(context, std::move(proxy),
+    paint.addColorTextureProcessor(context->resourceProvider(), std::move(proxy),
                                    nullptr, SkMatrix::MakeScale(rtS), mipMapParams);
 
     // 1) Draw texture to S32 surface (should generate/use sRGB mips)