Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)

This is pulled out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I5feac04dc1bf54bd74c65febdf6bba9e7ce28f55
Reviewed-on: https://skia-review.googlesource.com/8942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 744ef18..e398050 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -1413,7 +1413,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 #if SK_SUPPORT_GPU
-sk_sp<GrTexture> GrClipStackClip::testingOnly_createClipMask(GrContext* context) const {
+sk_sp<GrTextureProxy> GrClipStackClip::testingOnly_createClipMask(GrContext* context) const {
     const GrReducedClip reducedClip(*fStack, SkRect::MakeWH(512, 512), 0);
     return this->createSoftwareClipMask(context, reducedClip);
 }
@@ -1440,8 +1440,9 @@
         m.setTranslate(0.5, 0.5);
         stack.save();
         stack.clipPath(path, m, SkClipOp::kIntersect, true);
-        auto mask = GrClipStackClip(&stack).testingOnly_createClipMask(context);
-        REPORTER_ASSERT(reporter, 0 == strcmp(mask->getUniqueKey().tag(), kTag));
+        sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context);
+        GrTexture* tex = mask->instantiate(context->textureProvider());
+        REPORTER_ASSERT(reporter, 0 == strcmp(tex->getUniqueKey().tag(), kTag));
         // Make sure mask isn't pinned in cache.
         mask.reset(nullptr);
         context->flush();