Begin removing deprecated (and now, unused) ImageFilter code paths

This CL focuses on removing the Proxy objects but takes some other stuff with it.

BUG=skia:4965
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1896383003

Review URL: https://codereview.chromium.org/1896383003
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 83a7093..c8a1d5e 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -374,7 +374,6 @@
     friend class SkDraw;
     friend class SkDrawIter;
     friend class SkDeviceFilteredPaint;
-    friend class SkImageFilter::DeviceProxy;
     friend class SkNoPixelsBitmapDevice;
     friend class SkSurface_Raster;
 
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index a19633b..8cab6ef 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -111,25 +111,6 @@
         kNever_TileUsage,       //!< the created device will never be drawn tiled
     };
 
-    class Proxy {
-    public:
-        virtual ~Proxy() {}
-
-        virtual SkBaseDevice* createDevice(int width, int height,
-                                           TileUsage usage = kNever_TileUsage) = 0;
-    };
-
-    class DeviceProxy : public Proxy {
-    public:
-        DeviceProxy(SkBaseDevice* device) : fDevice(device) {}
-
-        SkBaseDevice* createDevice(int width, int height,
-                                   TileUsage usage = kNever_TileUsage) override;
-
-    private:
-        SkBaseDevice* fDevice;
-    };
-
     /**
      *  Request a new (result) image to be created from the src image.
      *
@@ -168,8 +149,7 @@
 #if SK_SUPPORT_GPU
     static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context, 
                                             sk_sp<GrFragmentProcessor> fp,
-                                            const SkIRect& bounds,
-                                            SkImageFilter::Proxy* proxy);
+                                            const SkIRect& bounds);
 #endif
 
     /**
@@ -217,9 +197,7 @@
      *  The size of the crop rect should be
      *  used as the size of the destination image. The origin of this rect
      *  should be used to offset access to the input images, and should also
-     *  be added to the "offset" parameter in onFilterImage and
-     *  filterImageGPU(). (The latter ensures that the resulting buffer is
-     *  drawn in the correct location.)
+     *  be added to the "offset" parameter in onFilterImage.
      */
     bool cropRectIsSet() const { return fCropRect.flags() != 0x0; }
 
@@ -257,12 +235,6 @@
     }
 #endif
 
-
-    sk_sp<SkSpecialImage> filterInput(int index,
-                                      SkSpecialImage* src,
-                                      const Context&, 
-                                      SkIPoint* offset) const;
-
     SK_TO_STRING_PUREVIRT()
     SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
 
@@ -320,15 +292,15 @@
      *  Offset is the amount to translate the resulting image relative to the
      *  src when it is drawn. This is an out-param.
      *
-     *  If the result image cannot be created, this should false, in which
-     *  case both the result and offset parameters will be ignored by the
-     *  caller.
+     *  If the result image cannot be created (either because of error or if, say, the result
+     *  is entirely clipped out), this should return nullptr.
+     *  Callers that affect transparent black should explicitly handle nullptr
+     *  results and press on. In the error case this behavior will produce a better result
+     *  than nothing and is necessary for the clipped out case.
+     *  If the return value is nullptr then offset should be ignored.
      */
-    virtual bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
-                                         SkBitmap* result, SkIPoint* offset) const;
-
     virtual sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* src, const Context&,
-                                                SkIPoint* offset) const;
+                                                SkIPoint* offset) const = 0;
 
     /**
      * This function recurses into its inputs with the given rect (first
@@ -359,12 +331,13 @@
     virtual SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix&, MapDirection) const;
 
     // Helper function which invokes filter processing on the input at the
-    // specified "index". If the input is null, it leaves "result" and
-    // "offset" untouched, and returns true. If the input is non-null, it
-    // calls filterImage() on that input, and returns true on success.
-    // i.e., return !getInput(index) || getInput(index)->filterImage(...);
-    bool filterInputDeprecated(int index, Proxy*, const SkBitmap& src, const Context&,
-                               SkBitmap* result, SkIPoint* offset) const;
+    // specified "index". If the input is null, it returns "src" and leaves
+    // "offset" untouched. If the input is non-null, it
+    // calls filterImage() on that input, and returns the result.
+    sk_sp<SkSpecialImage> filterInput(int index,
+                                      SkSpecialImage* src,
+                                      const Context&, 
+                                      SkIPoint* offset) const;
 
     /**
      *  Return true (and return a ref'd colorfilter) if this node in the DAG is just a
@@ -409,8 +382,6 @@
     static void PurgeCache();
 
     void init(sk_sp<SkImageFilter>* inputs, int inputCount, const CropRect* cropRect);
-    bool filterImageDeprecated(Proxy*, const SkBitmap& src, const Context&,
-                               SkBitmap* result, SkIPoint* offset) const;
 
     bool usesSrcInput() const { return fUsesSrcInput; }
     virtual bool affectsTransparentBlack() const { return false; }
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index b07b431..3732a35 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1408,7 +1408,6 @@
         SkImageFilter* filter = paint->getImageFilter();
         SkIPoint pos = { x - iter.getX(), y - iter.getY() };
         if (filter) {
-            SkImageFilter::DeviceProxy proxy(dstDev);
             SkIPoint offset = SkIPoint::Make(0, 0);
             const SkBitmap& srcBM = srcDev->accessBitmap(false);
             SkMatrix matrix = *iter.fMatrix;
@@ -1417,7 +1416,7 @@
             SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache());
             SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
 
-            sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(&proxy, srcBM,
+            sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(srcBM,
                                                                          &dstDev->surfaceProps()));
             if (!srcImg) {
                 continue; // something disastrous happened
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index d4bbc27..24118f4 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -409,7 +409,6 @@
     SkImageFilter* filter = paint.getImageFilter();
     SkASSERT(filter);
 
-    SkImageFilter::DeviceProxy proxy(this);
     SkIPoint offset = SkIPoint::Make(0, 0);
     SkMatrix matrix = *draw.fMatrix;
     matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
@@ -417,8 +416,7 @@
     SkAutoTUnref<SkImageFilter::Cache> cache(this->getImageFilterCache());
     SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
 
-    sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(&proxy, bitmap,
-                                                                 &this->surfaceProps()));
+    sk_sp<SkSpecialImage> srcImg(SkSpecialImage::internal_fromBM(bitmap, &this->surfaceProps()));
     if (!srcImg) {
         return; // something disastrous happened
     }
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index b71b79a..18fafd9 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -229,7 +229,7 @@
         // Keep the result on the GPU - this is still required for some
         // image filters that don't support GPU in all cases
         GrContext* context = src->getContext();
-        result = result->makeTextureImage(src->internal_getProxy(), context);
+        result = result->makeTextureImage(context);
     }
 #endif
 
@@ -242,54 +242,6 @@
     return result;
 }
 
-bool SkImageFilter::filterImageDeprecated(Proxy* proxy, const SkBitmap& src,
-                                          const Context& context,
-                                          SkBitmap* result, SkIPoint* offset) const {
-    SkASSERT(result);
-    SkASSERT(offset);
-    uint32_t srcGenID = fUsesSrcInput ? src.getGenerationID() : 0;
-    Cache::Key key(fUniqueID, context.ctm(), context.clipBounds(),
-                   srcGenID, SkIRect::MakeWH(0, 0));
-    if (context.cache()) {
-        if (context.cache()->get(key, result, offset)) {
-            return true;
-        }
-    }
-    if (this->onFilterImageDeprecated(proxy, src, context, result, offset)) {
-        if (context.cache()) {
-            context.cache()->set(key, *result, *offset);
-            SkAutoMutexAcquire mutex(fMutex);
-            fCacheKeys.push_back(key);
-        }
-        return true;
-    }
-    return false;
-}
-
-bool SkImageFilter::filterInputDeprecated(int index, Proxy* proxy, const SkBitmap& src,
-                                          const Context& ctx,
-                                          SkBitmap* result, SkIPoint* offset) const {
-    SkImageFilter* input = this->getInput(index);
-    if (!input) {
-        return true;
-    }
-
-    // SRGBTODO: Don't handle sRGB here, in anticipation of this code path being deleted.
-    sk_sp<SkSpecialImage> specialSrc(SkSpecialImage::internal_fromBM(proxy, src, nullptr));
-    if (!specialSrc) {
-        return false;
-    }
-
-    sk_sp<SkSpecialImage> tmp(input->onFilterImage(specialSrc.get(),
-                                                   this->mapContext(ctx),
-                                                   offset));
-    if (!tmp) {
-        return false;
-    }
-
-    return tmp->internal_getBM(result);
-}
-
 SkIRect SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
                                  MapDirection direction) const {
     if (kReverse_MapDirection == direction) {
@@ -333,38 +285,10 @@
     return true;
 }
 
-bool SkImageFilter::onFilterImageDeprecated(Proxy*, const SkBitmap&, const Context&,
-                                            SkBitmap*, SkIPoint*) const {
-    // Only classes that now use the new SkSpecialImage-based path will not have
-    // onFilterImageDeprecated methods. For those classes we should never be
-    // calling this method.
-    SkASSERT(0);
-    return false;
-}
-
-// SkImageFilter-derived classes that do not yet have their own onFilterImage
-// implementation convert back to calling the deprecated filterImage method
-sk_sp<SkSpecialImage> SkImageFilter::onFilterImage(SkSpecialImage* src, const Context& ctx,
-                                                   SkIPoint* offset) const {
-    SkBitmap srcBM, resultBM;
-
-    if (!src->internal_getBM(&srcBM)) {
-        return nullptr;
-    }
-
-    // This is the only valid call to the old filterImage path
-    if (!this->filterImageDeprecated(src->internal_getProxy(), srcBM, ctx, &resultBM, offset)) {
-        return nullptr;
-    }
-
-    return SkSpecialImage::internal_fromBM(src->internal_getProxy(), resultBM, &src->props());
-}
-
 #if SK_SUPPORT_GPU
 sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
                                                 sk_sp<GrFragmentProcessor> fp,
-                                                const SkIRect& bounds,
-                                                SkImageFilter::Proxy* proxy) {
+                                                const SkIRect& bounds) {
     GrPaint paint;
     paint.addColorFragmentProcessor(fp.get());
     paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
@@ -390,8 +314,7 @@
     GrClip clip(dstRect);
     drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect);
 
-    return SkSpecialImage::MakeFromGpu(proxy,
-                                       SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                        kNeedNewImageUniqueID_SpecialImage,
                                        dst.get());
 
@@ -680,20 +603,3 @@
     Cache::Get()->purge();
 }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-SkBaseDevice* SkImageFilter::DeviceProxy::createDevice(int w, int h, TileUsage usage) {
-    SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h),
-                                   kPossible_TileUsage == usage ? SkBaseDevice::kPossible_TileUsage
-                                                                : SkBaseDevice::kNever_TileUsage,
-                                   kUnknown_SkPixelGeometry,
-                                   false,   /* preserveLCDText */
-                                   true /*forImageFilter*/);
-    SkBaseDevice* dev = fDevice->onCreateDevice(cinfo, nullptr);
-    if (nullptr == dev) {
-        const SkSurfaceProps surfaceProps(fDevice->fSurfaceProps.flags(),
-                                          kUnknown_SkPixelGeometry);
-        dev = SkBitmapDevice::Create(cinfo.fInfo, surfaceProps);
-    }
-    return dev;
-}
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index f7bbf9e..bbc7635 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -21,11 +21,10 @@
 ///////////////////////////////////////////////////////////////////////////////
 class SkSpecialImage_Base : public SkSpecialImage {
 public:
-    SkSpecialImage_Base(SkImageFilter::Proxy* proxy, const SkIRect& subset, uint32_t uniqueID,
-                        const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, uniqueID, props) {
+    SkSpecialImage_Base(const SkIRect& subset, uint32_t uniqueID, const SkSurfaceProps* props)
+        : INHERITED(subset, uniqueID, props) {
     }
-    virtual ~SkSpecialImage_Base() { }
+    ~SkSpecialImage_Base() override { }
 
     virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const = 0;
 
@@ -55,18 +54,15 @@
     return static_cast<const SkSpecialImage_Base*>(image);
 }
 
-SkSpecialImage::SkSpecialImage(SkImageFilter::Proxy* proxy,
-                               const SkIRect& subset,
+SkSpecialImage::SkSpecialImage(const SkIRect& subset,
                                uint32_t uniqueID,
                                const SkSurfaceProps* props)
     : fProps(SkSurfacePropsCopyOrDefault(props))
     , fSubset(subset)
-    , fUniqueID(kNeedNewImageUniqueID_SpecialImage == uniqueID ? SkNextID::ImageID() : uniqueID)
-    , fProxy(proxy) {
+    , fUniqueID(kNeedNewImageUniqueID_SpecialImage == uniqueID ? SkNextID::ImageID() : uniqueID) {
 }
 
-sk_sp<SkSpecialImage> SkSpecialImage::makeTextureImage(SkImageFilter::Proxy* proxy,
-                                                       GrContext* context) {
+sk_sp<SkSpecialImage> SkSpecialImage::makeTextureImage(GrContext* context) {
 #if SK_SUPPORT_GPU
     if (!context) {
         return nullptr;
@@ -81,7 +77,7 @@
     }
 
     if (bmp.empty()) {
-        return SkSpecialImage::MakeFromRaster(proxy, SkIRect::MakeEmpty(), bmp, &this->props());
+        return SkSpecialImage::MakeFromRaster(SkIRect::MakeEmpty(), bmp, &this->props());
     }
 
     SkAutoTUnref<GrTexture> resultTex(
@@ -92,8 +88,7 @@
 
     SkAlphaType at = this->isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
 
-    return SkSpecialImage::MakeFromGpu(proxy,
-                                       SkIRect::MakeWH(resultTex->width(), resultTex->height()),
+    return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(resultTex->width(), resultTex->height()),
                                        this->uniqueID(),
                                        resultTex, &this->props(), at);
 #else
@@ -154,19 +149,17 @@
 #include "SkGrPixelRef.h"
 #endif
 
-sk_sp<SkSpecialImage> SkSpecialImage::internal_fromBM(SkImageFilter::Proxy* proxy,
-                                                      const SkBitmap& src,
+sk_sp<SkSpecialImage> SkSpecialImage::internal_fromBM(const SkBitmap& src,
                                                       const SkSurfaceProps* props) {
     // Need to test offset case! (see skbug.com/4967)
     if (src.getTexture()) {
-        return SkSpecialImage::MakeFromGpu(proxy,
-                                           src.bounds(),
+        return SkSpecialImage::MakeFromGpu(src.bounds(),
                                            src.getGenerationID(),
                                            src.getTexture(),
                                            props);
     }
 
-    return SkSpecialImage::MakeFromRaster(proxy, src.bounds(), src, props);
+    return SkSpecialImage::MakeFromRaster(src.bounds(), src, props);
 }
 
 bool SkSpecialImage::internal_getBM(SkBitmap* result) {
@@ -176,10 +169,6 @@
     return ib->getBitmapDeprecated(result);
 }
 
-SkImageFilter::Proxy* SkSpecialImage::internal_getProxy() const {
-    return fProxy;
-}
-
 ///////////////////////////////////////////////////////////////////////////////
 #include "SkImage.h"
 #if SK_SUPPORT_GPU
@@ -189,11 +178,10 @@
 
 class SkSpecialImage_Image : public SkSpecialImage_Base {
 public:
-    SkSpecialImage_Image(SkImageFilter::Proxy* proxy,
-                         const SkIRect& subset,
+    SkSpecialImage_Image(const SkIRect& subset,
                          sk_sp<SkImage> image,
                          const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, image->uniqueID(), props)
+        : INHERITED(subset, image->uniqueID(), props)
         , fImage(image) {
     }
 
@@ -262,10 +250,10 @@
             GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *texture->getContext()->caps());
             desc.fFlags = kRenderTarget_GrSurfaceFlag;
 
-            return SkSpecialSurface::MakeRenderTarget(this->proxy(), texture->getContext(), desc);
+            return SkSpecialSurface::MakeRenderTarget(texture->getContext(), desc);
         }
 #endif
-        return SkSpecialSurface::MakeRaster(this->proxy(), info, nullptr);
+        return SkSpecialSurface::MakeRaster(info, nullptr);
     }
 
     sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override {
@@ -274,8 +262,7 @@
             return nullptr;
         }
 
-        return SkSpecialImage::MakeFromImage(this->internal_getProxy(),
-                                             SkIRect::MakeWH(subset.width(), subset.height()),
+        return SkSpecialImage::MakeFromImage(SkIRect::MakeWH(subset.width(), subset.height()),
                                              subsetImg,
                                              &this->props());
     }
@@ -314,13 +301,12 @@
 }
 #endif
 
-sk_sp<SkSpecialImage> SkSpecialImage::MakeFromImage(SkImageFilter::Proxy* proxy,
-                                                    const SkIRect& subset,
+sk_sp<SkSpecialImage> SkSpecialImage::MakeFromImage(const SkIRect& subset,
                                                     sk_sp<SkImage> image,
                                                     const SkSurfaceProps* props) {
     SkASSERT(rect_fits(subset, image->width(), image->height()));
 
-    return sk_make_sp<SkSpecialImage_Image>(proxy, subset, image, props);
+    return sk_make_sp<SkSpecialImage_Image>(subset, image, props);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -330,9 +316,8 @@
 
 class SkSpecialImage_Raster : public SkSpecialImage_Base {
 public:
-    SkSpecialImage_Raster(SkImageFilter::Proxy* proxy, const SkIRect& subset, const SkBitmap& bm,
-                          const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, bm.getGenerationID(), props)
+    SkSpecialImage_Raster(const SkIRect& subset, const SkBitmap& bm, const SkSurfaceProps* props)
+        : INHERITED(subset, bm.getGenerationID(), props)
         , fBitmap(bm) {
         if (bm.pixelRef() && bm.pixelRef()->isPreLocked()) {
             // we only preemptively lock if there is no chance of triggering something expensive
@@ -341,13 +326,12 @@
         }
     }
 
-    SkSpecialImage_Raster(SkImageFilter::Proxy* proxy,
-                          const SkIRect& subset,
+    SkSpecialImage_Raster(const SkIRect& subset,
                           const SkPixmap& pixmap,
                           RasterReleaseProc releaseProc,
                           ReleaseContext context,
                           const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, kNeedNewImageUniqueID_SpecialImage, props) {
+        : INHERITED(subset, kNeedNewImageUniqueID_SpecialImage, props) {
         fBitmap.installPixels(pixmap.info(), pixmap.writable_addr(),
                               pixmap.rowBytes(), pixmap.ctable(),
                               releaseProc, context);
@@ -388,7 +372,7 @@
     }
 
     sk_sp<SkSpecialSurface> onMakeSurface(const SkImageInfo& info) const override {
-        return SkSpecialSurface::MakeRaster(this->proxy(), info, nullptr);
+        return SkSpecialSurface::MakeRaster(info, nullptr);
     }
 
     sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override {
@@ -398,8 +382,7 @@
             return nullptr;
         }
 
-        return SkSpecialImage::MakeFromRaster(this->internal_getProxy(),
-                                              SkIRect::MakeWH(subset.width(), subset.height()),
+        return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(subset.width(), subset.height()),
                                               subsetBM,
                                               &this->props());
     }
@@ -424,18 +407,16 @@
     typedef SkSpecialImage_Base INHERITED;
 };
 
-sk_sp<SkSpecialImage> SkSpecialImage::MakeFromRaster(SkImageFilter::Proxy* proxy,
-                                                     const SkIRect& subset,
+sk_sp<SkSpecialImage> SkSpecialImage::MakeFromRaster(const SkIRect& subset,
                                                      const SkBitmap& bm,
                                                      const SkSurfaceProps* props) {
     SkASSERT(nullptr == bm.getTexture());
     SkASSERT(rect_fits(subset, bm.width(), bm.height()));
 
-    return sk_make_sp<SkSpecialImage_Raster>(proxy, subset, bm, props);
+    return sk_make_sp<SkSpecialImage_Raster>(subset, bm, props);
 }
 
-sk_sp<SkSpecialImage> SkSpecialImage::MakeFromPixmap(SkImageFilter::Proxy* proxy,
-                                                     const SkIRect& subset,
+sk_sp<SkSpecialImage> SkSpecialImage::MakeFromPixmap(const SkIRect& subset,
                                                      const SkPixmap& src,
                                                      RasterReleaseProc releaseProc,
                                                      ReleaseContext context,
@@ -444,7 +425,7 @@
         return nullptr;
     }
 
-    return sk_make_sp<SkSpecialImage_Raster>(proxy, subset, src, releaseProc, context, props);
+    return sk_make_sp<SkSpecialImage_Raster>(subset, src, releaseProc, context, props);
 }
 
 
@@ -455,10 +436,10 @@
 
 class SkSpecialImage_Gpu : public SkSpecialImage_Base {
 public:
-    SkSpecialImage_Gpu(SkImageFilter::Proxy* proxy, const SkIRect& subset,
+    SkSpecialImage_Gpu(const SkIRect& subset,
                        uint32_t uniqueID, GrTexture* tex, SkAlphaType at,
                        const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, uniqueID, props)
+        : INHERITED(subset, uniqueID, props)
         , fTexture(SkRef(tex))
         , fAlphaType(at)
         , fAddedRasterVersionToCache(false) {
@@ -543,12 +524,11 @@
         GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *fTexture->getContext()->caps());
         desc.fFlags = kRenderTarget_GrSurfaceFlag;
 
-        return SkSpecialSurface::MakeRenderTarget(this->proxy(), fTexture->getContext(), desc);
+        return SkSpecialSurface::MakeRenderTarget(fTexture->getContext(), desc);
     }
 
     sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override {
-        return SkSpecialImage::MakeFromGpu(this->internal_getProxy(),
-                                           subset,
+        return SkSpecialImage::MakeFromGpu(subset,
                                            this->uniqueID(),
                                            fTexture,
                                            &this->props(),
@@ -592,20 +572,18 @@
     typedef SkSpecialImage_Base INHERITED;
 };
 
-sk_sp<SkSpecialImage> SkSpecialImage::MakeFromGpu(SkImageFilter::Proxy* proxy,
-                                                  const SkIRect& subset,
+sk_sp<SkSpecialImage> SkSpecialImage::MakeFromGpu(const SkIRect& subset,
                                                   uint32_t uniqueID,
                                                   GrTexture* tex,
                                                   const SkSurfaceProps* props,
                                                   SkAlphaType at) {
     SkASSERT(rect_fits(subset, tex->width(), tex->height()));
-    return sk_make_sp<SkSpecialImage_Gpu>(proxy, subset, uniqueID, tex, at, props);
+    return sk_make_sp<SkSpecialImage_Gpu>(subset, uniqueID, tex, at, props);
 }
 
 #else
 
-sk_sp<SkSpecialImage> SkSpecialImage::MakeFromGpu(SkImageFilter::Proxy* proxy,
-                                                  const SkIRect& subset,
+sk_sp<SkSpecialImage> SkSpecialImage::MakeFromGpu(const SkIRect& subset,
                                                   uint32_t uniqueID,
                                                   GrTexture* tex,
                                                   const SkSurfaceProps* props,
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h
index 2aa5bc6..aec3443 100644
--- a/src/core/SkSpecialImage.h
+++ b/src/core/SkSpecialImage.h
@@ -63,29 +63,25 @@
      *  transformation is required, the returned image may be the same as this special image.
      *  If this special image is from a different GrContext, this will fail.
      */
-    sk_sp<SkSpecialImage> makeTextureImage(SkImageFilter::Proxy*, GrContext*);
+    sk_sp<SkSpecialImage> makeTextureImage(GrContext*);
 
     /**
      *  Draw this SpecialImage into the canvas.
      */
     void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const;
 
-    static sk_sp<SkSpecialImage> MakeFromImage(SkImageFilter::Proxy*,
-                                               const SkIRect& subset,
+    static sk_sp<SkSpecialImage> MakeFromImage(const SkIRect& subset,
                                                sk_sp<SkImage>,
                                                const SkSurfaceProps* = nullptr);
-    static sk_sp<SkSpecialImage> MakeFromRaster(SkImageFilter::Proxy*,
-                                                const SkIRect& subset,
+    static sk_sp<SkSpecialImage> MakeFromRaster(const SkIRect& subset,
                                                 const SkBitmap&,
                                                 const SkSurfaceProps* = nullptr);
-    static sk_sp<SkSpecialImage> MakeFromGpu(SkImageFilter::Proxy*,
-                                             const SkIRect& subset,
+    static sk_sp<SkSpecialImage> MakeFromGpu(const SkIRect& subset,
                                              uint32_t uniqueID,
                                              GrTexture*,
                                              const SkSurfaceProps* = nullptr,
                                              SkAlphaType at = kPremul_SkAlphaType);
-    static sk_sp<SkSpecialImage> MakeFromPixmap(SkImageFilter::Proxy*,
-                                                const SkIRect& subset,
+    static sk_sp<SkSpecialImage> MakeFromPixmap(const SkIRect& subset,
                                                 const SkPixmap&,
                                                 RasterReleaseProc,
                                                 ReleaseContext,
@@ -117,9 +113,7 @@
 
     // These three internal methods will go away (see skbug.com/4965)
     bool internal_getBM(SkBitmap* result);
-    static sk_sp<SkSpecialImage> internal_fromBM(SkImageFilter::Proxy*, const SkBitmap&,
-                                                 const SkSurfaceProps*);
-    SkImageFilter::Proxy* internal_getProxy() const;
+    static sk_sp<SkSpecialImage> internal_fromBM(const SkBitmap&, const SkSurfaceProps*);
 
     // TODO: hide this when GrLayerHoister uses SkSpecialImages more fully (see skbug.com/5063)
     /**
@@ -148,24 +142,13 @@
     bool getROPixels(SkBitmap*) const;
 
 protected:
-    SkSpecialImage(SkImageFilter::Proxy*, const SkIRect& subset, uint32_t uniqueID,
-                   const SkSurfaceProps*);
-
-    // The following 2 are for testing and shouldn't be used.
-    friend class TestingSpecialImageAccess;
-    friend class TestingSpecialSurfaceAccess;
-
-    // TODO: remove this ASAP (see skbug.com/4965)
-    SkImageFilter::Proxy* proxy() const { return fProxy; }
+    SkSpecialImage(const SkIRect& subset, uint32_t uniqueID, const SkSurfaceProps*);
 
 private:
     const SkSurfaceProps fProps;
     const SkIRect        fSubset;
     const uint32_t       fUniqueID;
 
-    // TODO: remove this ASAP (see skbug.com/4965)
-    SkImageFilter::Proxy* fProxy;
-
     typedef SkRefCnt INHERITED;
 };
 
diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp
index eecdaec..2e2d8cc 100644
--- a/src/core/SkSpecialSurface.cpp
+++ b/src/core/SkSpecialSurface.cpp
@@ -13,9 +13,8 @@
  ///////////////////////////////////////////////////////////////////////////////
 class SkSpecialSurface_Base : public SkSpecialSurface {
 public:
-    SkSpecialSurface_Base(SkImageFilter::Proxy* proxy,
-                          const SkIRect& subset, const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, props)
+    SkSpecialSurface_Base(const SkIRect& subset, const SkSurfaceProps* props)
+        : INHERITED(subset, props)
         , fCanvas(nullptr) {
     }
 
@@ -41,12 +40,10 @@
     return static_cast<SkSpecialSurface_Base*>(surface);
 }
 
-SkSpecialSurface::SkSpecialSurface(SkImageFilter::Proxy* proxy,
-                                   const SkIRect& subset,
+SkSpecialSurface::SkSpecialSurface(const SkIRect& subset,
                                    const SkSurfaceProps* props)
     : fProps(SkSurfacePropsCopyOrDefault(props).flags(), kUnknown_SkPixelGeometry)
-    , fSubset(subset)
-    , fProxy(proxy) {
+    , fSubset(subset) {
     SkASSERT(fSubset.width() > 0);
     SkASSERT(fSubset.height() > 0);
 }
@@ -66,11 +63,10 @@
 
 class SkSpecialSurface_Raster : public SkSpecialSurface_Base {
 public:
-    SkSpecialSurface_Raster(SkImageFilter::Proxy* proxy,
-                            SkPixelRef* pr,
+    SkSpecialSurface_Raster(SkPixelRef* pr,
                             const SkIRect& subset,
                             const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, props) {
+        : INHERITED(subset, props) {
         const SkImageInfo& info = pr->info();
 
         fBitmap.setInfo(info, info.minRowBytes());
@@ -83,8 +79,7 @@
     ~SkSpecialSurface_Raster() override { }
 
     sk_sp<SkSpecialImage> onMakeImageSnapshot() override {
-        return SkSpecialImage::MakeFromRaster(this->proxy(), this->subset(), fBitmap,
-                                              &this->props());
+        return SkSpecialImage::MakeFromRaster(this->subset(), fBitmap, &this->props());
     }
 
 private:
@@ -93,14 +88,12 @@
     typedef SkSpecialSurface_Base INHERITED;
 };
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromBitmap(SkImageFilter::Proxy* proxy,
-                                                         const SkIRect& subset, SkBitmap& bm,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromBitmap(const SkIRect& subset, SkBitmap& bm,
                                                          const SkSurfaceProps* props) {
-    return sk_make_sp<SkSpecialSurface_Raster>(proxy, bm.pixelRef(), subset, props);
+    return sk_make_sp<SkSpecialSurface_Raster>(bm.pixelRef(), subset, props);
 }
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRaster(SkImageFilter::Proxy* proxy,
-                                                     const SkImageInfo& info,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRaster(const SkImageInfo& info,
                                                      const SkSurfaceProps* props) {
     SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewZeroed(info, 0, nullptr));
     if (nullptr == pr.get()) {
@@ -109,7 +102,7 @@
 
     const SkIRect subset = SkIRect::MakeWH(pr->info().width(), pr->info().height());
 
-    return sk_make_sp<SkSpecialSurface_Raster>(proxy, pr, subset, props);
+    return sk_make_sp<SkSpecialSurface_Raster>(pr, subset, props);
 }
 
 #if SK_SUPPORT_GPU
@@ -119,11 +112,10 @@
 
 class SkSpecialSurface_Gpu : public SkSpecialSurface_Base {
 public:
-    SkSpecialSurface_Gpu(SkImageFilter::Proxy* proxy,
-                         GrTexture* texture,
+    SkSpecialSurface_Gpu(GrTexture* texture,
                          const SkIRect& subset,
                          const SkSurfaceProps* props)
-        : INHERITED(proxy, subset, props)
+        : INHERITED(subset, props)
         , fTexture(SkRef(texture)) {
 
         SkASSERT(fTexture->asRenderTarget());
@@ -141,7 +133,7 @@
     ~SkSpecialSurface_Gpu() override { }
 
     sk_sp<SkSpecialImage> onMakeImageSnapshot() override {
-        return SkSpecialImage::MakeFromGpu(this->proxy(), this->subset(),
+        return SkSpecialImage::MakeFromGpu(this->subset(),
                                            kNeedNewImageUniqueID_SpecialImage, fTexture,
                                            &this->props());
     }
@@ -152,19 +144,17 @@
     typedef SkSpecialSurface_Base INHERITED;
 };
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(SkImageFilter::Proxy* proxy,
-                                                          const SkIRect& subset,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(const SkIRect& subset,
                                                           GrTexture* texture,
                                                           const SkSurfaceProps* props) {
     if (!texture->asRenderTarget()) {
         return nullptr;
     }
 
-    return sk_make_sp<SkSpecialSurface_Gpu>(proxy, texture, subset, props);
+    return sk_make_sp<SkSpecialSurface_Gpu>(texture, subset, props);
 }
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(SkImageFilter::Proxy* proxy,
-                                                           GrContext* context,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context,
                                                            const GrSurfaceDesc& desc,
                                                            const SkSurfaceProps* props) {
     if (!context || !SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag)) {
@@ -178,20 +168,18 @@
 
     const SkIRect subset = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
 
-    return sk_make_sp<SkSpecialSurface_Gpu>(proxy, temp, subset, props);
+    return sk_make_sp<SkSpecialSurface_Gpu>(temp, subset, props);
 }
 
 #else
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(SkImageFilter::Proxy* proxy,
-                                                          const SkIRect& subset,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(const SkIRect& subset,
                                                           GrTexture*,
                                                           const SkSurfaceProps*) {
     return nullptr;
 }
 
-sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(SkImageFilter::Proxy* proxy,
-                                                           GrContext* context,
+sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context,
                                                            const GrSurfaceDesc& desc,
                                                            const SkSurfaceProps* props) {
     return nullptr;
diff --git a/src/core/SkSpecialSurface.h b/src/core/SkSpecialSurface.h
index d24ee74..6ed8a77 100644
--- a/src/core/SkSpecialSurface.h
+++ b/src/core/SkSpecialSurface.h
@@ -53,23 +53,20 @@
     /**
      *  Use an existing (renderTarget-capable) GrTexture as the backing store.
      */
-    static sk_sp<SkSpecialSurface> MakeFromTexture(SkImageFilter::Proxy* proxy,
-                                                   const SkIRect& subset, GrTexture*,
+    static sk_sp<SkSpecialSurface> MakeFromTexture(const SkIRect& subset, GrTexture*,
                                                    const SkSurfaceProps* = nullptr);
 
     /**
      *  Allocate a new GPU-backed SkSpecialSurface. If the requested surface cannot
      *  be created, nullptr will be returned.
      */
-    static sk_sp<SkSpecialSurface> MakeRenderTarget(SkImageFilter::Proxy* proxy,
-                                                    GrContext*, const GrSurfaceDesc&,
+    static sk_sp<SkSpecialSurface> MakeRenderTarget(GrContext*, const GrSurfaceDesc&,
                                                     const SkSurfaceProps* = nullptr);
 
     /**
      * Use and existing SkBitmap as the backing store.
      */
-    static sk_sp<SkSpecialSurface> MakeFromBitmap(SkImageFilter::Proxy* proxy,
-                                                  const SkIRect& subset, SkBitmap& bm,
+    static sk_sp<SkSpecialSurface> MakeFromBitmap(const SkIRect& subset, SkBitmap& bm,
                                                   const SkSurfaceProps* = nullptr);
 
     /**
@@ -79,27 +76,20 @@
      *  If the requested surface cannot be created, or the request is not a
      *  supported configuration, nullptr will be returned.
      */
-    static sk_sp<SkSpecialSurface> MakeRaster(SkImageFilter::Proxy* proxy,
-                                              const SkImageInfo&,
+    static sk_sp<SkSpecialSurface> MakeRaster(const SkImageInfo&,
                                               const SkSurfaceProps* = nullptr);
 
 protected:
-    SkSpecialSurface(SkImageFilter::Proxy*, const SkIRect& subset, const SkSurfaceProps*);
+    SkSpecialSurface(const SkIRect& subset, const SkSurfaceProps*);
 
     // For testing only
     friend class TestingSpecialSurfaceAccess;
     const SkIRect& subset() const { return fSubset; }
 
-    // TODO: remove this ASAP (see skbug.com/4965)
-    SkImageFilter::Proxy* proxy() const { return fProxy; }
-
 private:
     const SkSurfaceProps fProps;
     const SkIRect        fSubset;
 
-    // TODO: remove this ASAP (see skbug.com/4965)
-    SkImageFilter::Proxy* fProxy;
-
     typedef SkRefCnt INHERITED;
 };
 
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 0d16ec6..bf2a3fd 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -187,7 +187,7 @@
             return nullptr;
         }
 
-        return DrawWithFP(context, std::move(fp), bounds, source->internal_getProxy());
+        return DrawWithFP(context, std::move(fp), bounds);
     }
 #endif
 
@@ -262,8 +262,7 @@
 
     offset->fX = bounds.left();
     offset->fY = bounds.top();
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst);
 }
 
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index 3ed88f1..d233c04 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -133,8 +133,7 @@
             return nullptr;
         }
 
-        return SkSpecialImage::MakeFromGpu(source->internal_getProxy(),
-                                           SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
+        return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
                                            kNeedNewImageUniqueID_SpecialImage,
                                            tex, &source->props());
     }
@@ -225,8 +224,7 @@
         SkOpts::box_blur_xy(t,  h,  dstBoundsT,   d, kernelSizeY3, highOffsetY, highOffsetY, h, w);
     }
 
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(dstBounds.width(),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(dstBounds.width(),
                                                           dstBounds.height()),
                                           dst, &source->props());
 }
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index b715f6a..c52b958 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -355,8 +355,7 @@
 
         offset->fX = bounds.left();
         offset->fY = bounds.top();
-        return SkSpecialImage::MakeFromGpu(source->internal_getProxy(),
-                                           SkIRect::MakeWH(bounds.width(), bounds.height()),
+        return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                            kNeedNewImageUniqueID_SpecialImage,
                                            dst);
     }
@@ -393,8 +392,7 @@
 
     offset->fX = bounds.left();
     offset->fY = bounds.top();
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst);
 }
 
diff --git a/src/effects/SkImageSource.cpp b/src/effects/SkImageSource.cpp
index e00bced..f3fc054 100644
--- a/src/effects/SkImageSource.cpp
+++ b/src/effects/SkImageSource.cpp
@@ -86,8 +86,7 @@
     if (fSrcRect == bounds && dstRect == bounds) {
         // No regions cropped out or resized; return entire image.
         offset->fX = offset->fY = 0;
-        return SkSpecialImage::MakeFromImage(source->internal_getProxy(),
-                                             SkIRect::MakeWH(fImage->width(), fImage->height()),
+        return SkSpecialImage::MakeFromImage(SkIRect::MakeWH(fImage->width(), fImage->height()),
                                              fImage,
                                              &source->props());
     }
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index b37fc28..7f0e3ea 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -460,8 +460,7 @@
     this->drawRect(drawContext.get(), inputTexture.get(), matrix, clip, bottomRight,
                    kBottomRight_BoundaryMode, pSrcBounds, offsetBounds);
 
-    return SkSpecialImage::MakeFromGpu(source->internal_getProxy(),
-                                       SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()),
+    return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()),
                                        kNeedNewImageUniqueID_SpecialImage,
                                        dst.get());
 }
@@ -1326,8 +1325,7 @@
             break;
     }
 
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst);
 }
 
@@ -1493,9 +1491,7 @@
             break;
     }
 
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
-                                          dst);
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()), dst);
 }
 
 #ifndef SK_IGNORE_TO_STRING
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 9ab18a7..517e31d 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -337,7 +337,7 @@
             return nullptr;
         }
 
-        return DrawWithFP(context, std::move(fp), bounds, source->internal_getProxy());
+        return DrawWithFP(context, std::move(fp), bounds);
     }
 #endif
 
@@ -408,8 +408,7 @@
 
     offset->fX = bounds.left();
     offset->fY = bounds.top();
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst);
 }
 
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index 51e3b6f..f5d9a3f 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -329,7 +329,7 @@
             return nullptr;
         }
 
-        return DrawWithFP(context, std::move(fp), bounds, source->internal_getProxy());
+        return DrawWithFP(context, std::move(fp), bounds);
     }
 #endif
 
@@ -381,8 +381,7 @@
     this->filterInteriorPixels(inputBM, &dst, interior, bounds);
     this->filterBorderPixels(inputBM, &dst, right, bounds);
     this->filterBorderPixels(inputBM, &dst, bottom, bounds);
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst);
 }
 
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 1f22a6e..d5a048c 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -533,8 +533,7 @@
         srcTexture.reset(scratch);
     }
 
-    return SkSpecialImage::MakeFromGpu(input->internal_getProxy(),
-                                       SkIRect::MakeWH(rect.width(), rect.height()),
+    return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(rect.width(), rect.height()),
                                        kNeedNewImageUniqueID_SpecialImage,
                                        srcTexture, &input->props());
 }
@@ -644,7 +643,6 @@
     offset->fX = bounds.left();
     offset->fY = bounds.top();
 
-    return SkSpecialImage::MakeFromRaster(source->internal_getProxy(),
-                                          SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                           dst, &source->props());
 }
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index af58a64..25a750e 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -257,8 +257,7 @@
     matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
     drawContext->drawRect(GrClip::WideOpen(), paint, matrix, SkRect::Make(bounds));
 
-    return SkSpecialImage::MakeFromGpu(source->internal_getProxy(),
-                                       SkIRect::MakeWH(bounds.width(), bounds.height()),
+    return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()),
                                        kNeedNewImageUniqueID_SpecialImage,
                                        dst.get());
 }
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index 9a2be0b..38aff8c 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -300,11 +300,9 @@
     SkAutoTUnref<SkImageFilter::Cache> cache(SkImageFilter::Cache::Create(kDefaultCacheSize));
     SkImageFilter::Context filterContext(totMat, clipBounds, cache);
 
-    SkImageFilter::DeviceProxy proxy(device);
-
     // TODO: should the layer hoister store stand alone layers as SkSpecialImages internally?
     const SkIRect subset = SkIRect::MakeWH(layer->texture()->width(), layer->texture()->height());
-    sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromGpu(&proxy, subset,
+    sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromGpu(subset,
                                                           kNeedNewImageUniqueID_SpecialImage,
                                                           layer->texture(),
                                                           &device->surfaceProps()));
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index 688069e..40c805a 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -138,11 +138,11 @@
 
     const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize);
 
-    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromRaster(nullptr, full, srcBM));
+    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromRaster(full, srcBM));
 
     const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
-    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromRaster(nullptr, subset, srcBM));
+    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromRaster(subset, srcBM));
 
     test_find_existing(reporter, fullImg, subsetImg);
     test_dont_find_if_diff_key(reporter, fullImg, subsetImg);
@@ -155,11 +155,11 @@
 static void test_image_backed(skiatest::Reporter* reporter, const sk_sp<SkImage>& srcImage) {
     const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize);
 
-    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromImage(nullptr, full, srcImage));
+    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromImage(full, srcImage));
 
     const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
-    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromImage(nullptr, subset, srcImage));
+    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromImage(subset, srcImage));
 
     test_find_existing(reporter, fullImg, subsetImg);
     test_dont_find_if_diff_key(reporter, fullImg, subsetImg);
@@ -220,13 +220,13 @@
 
     const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize);
 
-    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromGpu(nullptr, full,
+    sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromGpu(full,
                                                               kNeedNewImageUniqueID_SpecialImage,
                                                               srcTexture));
 
     const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
-    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromGpu(nullptr, subset,
+    sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromGpu(subset,
                                                                 kNeedNewImageUniqueID_SpecialImage,
                                                                 srcTexture));
 
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index e22d636..4db9196 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -6,7 +6,6 @@
  */
 
 #include "SkBitmap.h"
-#include "SkBitmapDevice.h"
 #include "SkBlurImageFilter.h"
 #include "SkCanvas.h"
 #include "SkColorFilterImageFilter.h"
@@ -38,11 +37,9 @@
 #include "SkTileImageFilter.h"
 #include "SkXfermodeImageFilter.h"
 #include "Test.h"
-#include "TestingSpecialImageAccess.h"
 
 #if SK_SUPPORT_GPU
 #include "GrContext.h"
-#include "SkGpuDevice.h"
 #endif
 
 static const int kBitmapSize = 4;
@@ -370,27 +367,23 @@
     return SkColorFilterImageFilter::Make(std::move(filter), std::move(input), cropRect);
 }
 
-static sk_sp<SkSpecialSurface> create_empty_special_surface(GrContext* context,
-                                                            SkImageFilter::Proxy* proxy,
-                                                            int widthHeight) {
+static sk_sp<SkSpecialSurface> create_empty_special_surface(GrContext* context, int widthHeight) {
     if (context) {
         GrSurfaceDesc desc;
         desc.fConfig = kSkia8888_GrPixelConfig;
         desc.fFlags  = kRenderTarget_GrSurfaceFlag;
         desc.fWidth  = widthHeight;
         desc.fHeight = widthHeight;
-        return SkSpecialSurface::MakeRenderTarget(proxy, context, desc);
+        return SkSpecialSurface::MakeRenderTarget(context, desc);
     } else {
         const SkImageInfo info = SkImageInfo::MakeN32(widthHeight, widthHeight,
                                                       kOpaque_SkAlphaType);
-        return SkSpecialSurface::MakeRaster(proxy, info);
+        return SkSpecialSurface::MakeRaster(info);
     }
 }
 
-static sk_sp<SkSpecialImage> create_empty_special_image(GrContext* context,
-                                                        SkImageFilter::Proxy* proxy,
-                                                        int widthHeight) {
-    sk_sp<SkSpecialSurface> surf(create_empty_special_surface(context, proxy, widthHeight));
+static sk_sp<SkSpecialImage> create_empty_special_image(GrContext* context, int widthHeight) {
+    sk_sp<SkSpecialSurface> surf(create_empty_special_surface(context, widthHeight));
 
     SkASSERT(surf);
 
@@ -521,13 +514,12 @@
     }
 }
 
-static void test_crop_rects(SkImageFilter::Proxy* proxy,
-                            skiatest::Reporter* reporter,
+static void test_crop_rects(skiatest::Reporter* reporter,
                             GrContext* context) {
     // Check that all filters offset to their absolute crop rect,
     // unaffected by the input crop rect.
     // Tests pass by not asserting.
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 100));
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 100));
     SkASSERT(srcImg);
 
     SkImageFilter::CropRect inputCropRect(SkRect::MakeXYWH(8, 13, 80, 80));
@@ -546,8 +538,7 @@
     }
 }
 
-static void test_negative_blur_sigma(SkImageFilter::Proxy* proxy,
-                                     skiatest::Reporter* reporter,
+static void test_negative_blur_sigma(skiatest::Reporter* reporter,
                                      GrContext* context) {
     // Check that SkBlurImageFilter will accept a negative sigma, either in
     // the given arguments or after CTM application.
@@ -558,8 +549,7 @@
     sk_sp<SkImageFilter> negativeFilter(SkBlurImageFilter::Make(-five, five, nullptr));
 
     SkBitmap gradient = make_gradient_circle(width, height);
-    sk_sp<SkSpecialImage> imgSrc(SkSpecialImage::MakeFromRaster(proxy,
-                                                                SkIRect::MakeWH(width, height),
+    sk_sp<SkSpecialImage> imgSrc(SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(width, height),
                                                                 gradient));
 
     SkIPoint offset;
@@ -623,62 +613,23 @@
     }
 }
 
-typedef void (*PFTest)(SkImageFilter::Proxy* proxy,
-                       skiatest::Reporter* reporter,
-                       GrContext* context);
-
-static void run_raster_test(skiatest::Reporter* reporter,
-                            int widthHeight,
-                            PFTest test) {
-    const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
-
-    const SkImageInfo info = SkImageInfo::MakeN32Premul(widthHeight, widthHeight);
-
-    sk_sp<SkBaseDevice> device(SkBitmapDevice::Create(info, props));
-    SkImageFilter::DeviceProxy proxy(device.get());
-
-    (*test)(&proxy, reporter, nullptr);
-}
-
-#if SK_SUPPORT_GPU
-static void run_gpu_test(skiatest::Reporter* reporter,
-                         GrContext* context,
-                         int widthHeight,
-                         PFTest test) {
-    const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
-
-    sk_sp<SkGpuDevice> device(SkGpuDevice::Create(context,
-                                                  SkBudgeted::kNo,
-                                                  SkImageInfo::MakeN32Premul(widthHeight,
-                                                                             widthHeight),
-                                                  0,
-                                                  &props,
-                                                  SkGpuDevice::kUninit_InitContents));
-    SkImageFilter::DeviceProxy proxy(device.get());
-
-    (*test)(&proxy, reporter, context);
-}
-#endif
-
 DEF_TEST(ImageFilterNegativeBlurSigma, reporter) {
-    run_raster_test(reporter, 100, test_negative_blur_sigma);
+    test_negative_blur_sigma(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterNegativeBlurSigma_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_negative_blur_sigma);
+    test_negative_blur_sigma(reporter, ctxInfo.fGrContext);
 }
 #endif
 
-static void test_zero_blur_sigma(SkImageFilter::Proxy* proxy,
-                                 skiatest::Reporter* reporter,
-                                 GrContext* context) {
+static void test_zero_blur_sigma(skiatest::Reporter* reporter, GrContext* context) {
     // Check that SkBlurImageFilter with a zero sigma and a non-zero srcOffset works correctly.
     SkImageFilter::CropRect cropRect(SkRect::Make(SkIRect::MakeXYWH(5, 0, 5, 10)));
     sk_sp<SkImageFilter> input(SkOffsetImageFilter::Make(0, 0, nullptr, &cropRect));
     sk_sp<SkImageFilter> filter(SkBlurImageFilter::Make(0, 0, std::move(input), &cropRect));
 
-    sk_sp<SkSpecialSurface> surf(create_empty_special_surface(context, proxy, 10));
+    sk_sp<SkSpecialSurface> surf(create_empty_special_surface(context, 10));
     surf->getCanvas()->clear(SK_ColorGREEN);
     sk_sp<SkSpecialImage> image(surf->makeImageSnapshot());
 
@@ -707,23 +658,21 @@
 }
 
 DEF_TEST(ImageFilterZeroBlurSigma, reporter) {
-    run_raster_test(reporter, 100, test_zero_blur_sigma);
+    test_zero_blur_sigma(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterZeroBlurSigma_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_zero_blur_sigma);
+    test_zero_blur_sigma(reporter, ctxInfo.fGrContext);
 }
 #endif
 
 
 // Tests that, even when an upstream filter has returned null (due to failure or clipping), a
 // downstream filter that affects transparent black still does so even with a nullptr input.
-static void test_fail_affects_transparent_black(SkImageFilter::Proxy* proxy,
-                                                skiatest::Reporter* reporter,
-                                                GrContext* context) {
+static void test_fail_affects_transparent_black(skiatest::Reporter* reporter, GrContext* context) {
     sk_sp<FailImageFilter> failFilter(new FailImageFilter());
-    sk_sp<SkSpecialImage> source(create_empty_special_image(context, proxy, 5));
+    sk_sp<SkSpecialImage> source(create_empty_special_image(context, 5));
     SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeXYWH(0, 0, 1, 1), nullptr);
     sk_sp<SkColorFilter> green(SkColorFilter::MakeModeFilter(SK_ColorGREEN, SkXfermode::kSrc_Mode));
     SkASSERT(green->affectsTransparentBlack());
@@ -741,12 +690,12 @@
 }
 
 DEF_TEST(ImageFilterFailAffectsTransparentBlack, reporter) {
-    run_raster_test(reporter, 100, test_fail_affects_transparent_black);
+    test_fail_affects_transparent_black(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterFailAffectsTransparentBlack_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_fail_affects_transparent_black);
+    test_fail_affects_transparent_black(reporter, ctxInfo.fGrContext);
 }
 #endif
 
@@ -935,9 +884,7 @@
     }
 }
 
-static void test_imagefilter_merge_result_size(SkImageFilter::Proxy* proxy,
-                                               skiatest::Reporter* reporter,
-                                               GrContext* context) {
+static void test_imagefilter_merge_result_size(skiatest::Reporter* reporter, GrContext* context) {
     SkBitmap greenBM;
     greenBM.allocN32Pixels(20, 20);
     greenBM.eraseColor(SK_ColorGREEN);
@@ -945,7 +892,7 @@
     sk_sp<SkImageFilter> source(SkImageSource::Make(std::move(greenImage)));
     sk_sp<SkImageFilter> merge(SkMergeImageFilter::Make(source, source));
 
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 1));
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 1));
 
     SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeXYWH(0, 0, 100, 100), nullptr);
     SkIPoint offset;
@@ -957,12 +904,12 @@
 }
 
 DEF_TEST(ImageFilterMergeResultSize, reporter) {
-    run_raster_test(reporter, 100, test_imagefilter_merge_result_size);
+    test_imagefilter_merge_result_size(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterMergeResultSize_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_imagefilter_merge_result_size);
+    test_imagefilter_merge_result_size(reporter, ctxInfo.fGrContext);
 }
 #endif
 
@@ -1092,9 +1039,7 @@
     canvas.restore();
 }
 
-static void test_big_kernel(SkImageFilter::Proxy* proxy,
-                            skiatest::Reporter* reporter,
-                            GrContext* context) {
+static void test_big_kernel(skiatest::Reporter* reporter, GrContext* context) {
     // Check that a kernel that is too big for the GPU still works
     SkScalar identityKernel[49] = {
         0, 0, 0, 0, 0, 0, 0,
@@ -1114,7 +1059,7 @@
                                         SkMatrixConvolutionImageFilter::kClamp_TileMode,
                                         true, nullptr));
 
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 100));
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 100));
     SkASSERT(srcImg);
 
     SkIPoint offset;
@@ -1127,23 +1072,23 @@
 }
 
 DEF_TEST(ImageFilterMatrixConvolutionBigKernel, reporter) {
-    run_raster_test(reporter, 100, test_big_kernel);
+    test_big_kernel(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ImageFilterMatrixConvolutionBigKernel_Gpu,
                                       reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_big_kernel);
+    test_big_kernel(reporter, ctxInfo.fGrContext);
 }
 #endif
 
 DEF_TEST(ImageFilterCropRect, reporter) {
-    run_raster_test(reporter, 100, test_crop_rects);
+    test_crop_rects(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCropRect_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_crop_rects);
+    test_crop_rects(reporter, ctxInfo.fGrContext);
 }
 #endif
 
@@ -1232,9 +1177,7 @@
         ? pixel != SK_ColorGREEN : pixel == SK_ColorGREEN);
 }
 
-static void test_clipped_picture_imagefilter(SkImageFilter::Proxy* proxy,
-                                             skiatest::Reporter* reporter,
-                                             GrContext* context) {
+static void test_clipped_picture_imagefilter(skiatest::Reporter* reporter, GrContext* context) {
     sk_sp<SkPicture> picture;
 
     {
@@ -1249,7 +1192,7 @@
         picture = recorder.finishRecordingAsPicture();
     }
 
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 2));
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 2));
 
     sk_sp<SkImageFilter> imageFilter(SkPictureImageFilter::Make(picture));
 
@@ -1261,12 +1204,12 @@
 }
 
 DEF_TEST(ImageFilterClippedPictureImageFilter, reporter) {
-    run_raster_test(reporter, 2, test_clipped_picture_imagefilter);
+    test_clipped_picture_imagefilter(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterClippedPictureImageFilter_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 2, test_clipped_picture_imagefilter);
+    test_clipped_picture_imagefilter(reporter, ctxInfo.fGrContext);
 }
 #endif
 
@@ -1500,10 +1443,8 @@
     test_xfermode_cropped_input(&canvas, reporter);
 }
 
-static void test_composed_imagefilter_offset(SkImageFilter::Proxy* proxy,
-                                             skiatest::Reporter* reporter,
-                                             GrContext* context) {
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 100));
+static void test_composed_imagefilter_offset(skiatest::Reporter* reporter, GrContext* context) {
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 100));
 
     SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(1, 0, 20, 20));
     sk_sp<SkImageFilter> offsetFilter(SkOffsetImageFilter::Make(0, 0, nullptr, &cropRect));
@@ -1520,18 +1461,16 @@
 }
 
 DEF_TEST(ComposedImageFilterOffset, reporter) {
-    run_raster_test(reporter, 100, test_composed_imagefilter_offset);
+    test_composed_imagefilter_offset(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ComposedImageFilterOffset_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_composed_imagefilter_offset);
+    test_composed_imagefilter_offset(reporter, ctxInfo.fGrContext);
 }
 #endif
 
-static void test_composed_imagefilter_bounds(SkImageFilter::Proxy* proxy,
-                                             skiatest::Reporter* reporter,
-                                             GrContext* context) {
+static void test_composed_imagefilter_bounds(skiatest::Reporter* reporter, GrContext* context) {
     // The bounds passed to the inner filter must be filtered by the outer
     // filter, so that the inner filter produces the pixels that the outer
     // filter requires as input. This matters if the outer filter moves pixels.
@@ -1549,7 +1488,7 @@
     sk_sp<SkImageFilter> composedFilter(SkComposeImageFilter::Make(std::move(offsetFilter),
                                                                    std::move(pictureFilter)));
 
-    sk_sp<SkSpecialImage> sourceImage(create_empty_special_image(context, proxy, 100));
+    sk_sp<SkSpecialImage> sourceImage(create_empty_special_image(context, 100));
     SkImageFilter::Context ctx(SkMatrix::I(), SkIRect::MakeWH(100, 100), nullptr);
     SkIPoint offset;
     sk_sp<SkSpecialImage> result(composedFilter->filterImage(sourceImage.get(), ctx, &offset));
@@ -1564,19 +1503,17 @@
 }
 
 DEF_TEST(ComposedImageFilterBounds, reporter) {
-    run_raster_test(reporter, 100, test_composed_imagefilter_bounds);
+    test_composed_imagefilter_bounds(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ComposedImageFilterBounds_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_composed_imagefilter_bounds);
+    test_composed_imagefilter_bounds(reporter, ctxInfo.fGrContext);
 }
 #endif
 
-static void test_partial_crop_rect(SkImageFilter::Proxy* proxy,
-                                   skiatest::Reporter* reporter,
-                                   GrContext* context) {
-    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, proxy, 100));
+static void test_partial_crop_rect(skiatest::Reporter* reporter, GrContext* context) {
+    sk_sp<SkSpecialImage> srcImg(create_empty_special_image(context, 100));
 
     SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(100, 0, 20, 30),
         SkImageFilter::CropRect::kHasWidth_CropEdge | SkImageFilter::CropRect::kHasHeight_CropEdge);
@@ -1594,12 +1531,12 @@
 }
 
 DEF_TEST(ImageFilterPartialCropRect, reporter) {
-    run_raster_test(reporter, 100, test_partial_crop_rect);
+    test_partial_crop_rect(reporter, nullptr);
 }
 
 #if SK_SUPPORT_GPU
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterPartialCropRect_Gpu, reporter, ctxInfo) {
-    run_gpu_test(reporter, ctxInfo.fGrContext, 100, test_partial_crop_rect);
+    test_partial_crop_rect(reporter, ctxInfo.fGrContext);
 }
 #endif
 
@@ -1740,31 +1677,27 @@
 #if SK_SUPPORT_GPU
 
 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterHugeBlur_Gpu, reporter, ctxInfo) {
-    const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
 
-    sk_sp<SkGpuDevice> device(SkGpuDevice::Create(ctxInfo.fGrContext,
-                                                  SkBudgeted::kNo,
-                                                  SkImageInfo::MakeN32Premul(100, 100),
-                                                  0,
-                                                  &props,
-                                                  SkGpuDevice::kUninit_InitContents));
-    SkCanvas canvas(device.get());
+    sk_sp<SkSurface> surf(SkSurface::MakeRenderTarget(ctxInfo.fGrContext,
+                                                      SkBudgeted::kNo,
+                                                      SkImageInfo::MakeN32Premul(100, 100)));
 
-    test_huge_blur(&canvas, reporter);
+
+    SkCanvas* canvas = surf->getCanvas();
+
+    test_huge_blur(canvas, reporter);
 }
 
 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(XfermodeImageFilterCroppedInput_Gpu, reporter, ctxInfo) {
-    const SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
 
-    sk_sp<SkGpuDevice> device(SkGpuDevice::Create(ctxInfo.fGrContext,
-                                                  SkBudgeted::kNo,
-                                                  SkImageInfo::MakeN32Premul(1, 1),
-                                                  0,
-                                                  &props,
-                                                  SkGpuDevice::kUninit_InitContents));
-    SkCanvas canvas(device.get());
+    sk_sp<SkSurface> surf(SkSurface::MakeRenderTarget(ctxInfo.fGrContext,
+                                                      SkBudgeted::kNo,
+                                                      SkImageInfo::MakeN32Premul(1, 1)));
 
-    test_xfermode_cropped_input(&canvas, reporter);
+
+    SkCanvas* canvas = surf->getCanvas();
+
+    test_xfermode_cropped_input(canvas, reporter);
 }
 
 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(ImageFilterBlurLargeImage_Gpu, reporter, ctxInfo) {
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp
index a8a7966..18d023f 100644
--- a/tests/SpecialImageTest.cpp
+++ b/tests/SpecialImageTest.cpp
@@ -14,7 +14,6 @@
 #include "SkSpecialSurface.h"
 #include "SkSurface.h"
 #include "Test.h"
-#include "TestingSpecialImageAccess.h"
 
 #if SK_SUPPORT_GPU
 #include "GrContext.h"
@@ -53,7 +52,7 @@
 static void test_image(const sk_sp<SkSpecialImage>& img, skiatest::Reporter* reporter,
                        GrContext* context, bool peekTextureSucceeds,
                        int offset, int size) {
-    const SkIRect subset = TestingSpecialImageAccess::Subset(img.get());
+    const SkIRect subset = img->subset();
     REPORTER_ASSERT(reporter, offset == subset.left());
     REPORTER_ASSERT(reporter, offset == subset.top());
     REPORTER_ASSERT(reporter, kSmallerSize == subset.width());
@@ -140,14 +139,13 @@
     SkBitmap bm = create_bm();
 
     sk_sp<SkSpecialImage> fullSImage(SkSpecialImage::MakeFromRaster(
-                                                            nullptr,
                                                             SkIRect::MakeWH(kFullSize, kFullSize),
                                                             bm));
 
     const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
     {
-        sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromRaster(nullptr, subset, bm));
+        sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromRaster(subset, bm));
         test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize);
     }
 
@@ -163,15 +161,13 @@
     sk_sp<SkImage> fullImage(SkImage::MakeFromBitmap(bm));
 
     sk_sp<SkSpecialImage> fullSImage(SkSpecialImage::MakeFromImage(
-                                                            nullptr,
                                                             SkIRect::MakeWH(kFullSize, kFullSize),
                                                             fullImage));
 
     const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
     {
-        sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromImage(nullptr, subset,
-                                                                     fullImage));
+        sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromImage(subset, fullImage));
         test_image(subSImg1, reporter, nullptr, false, kPad, kFullSize);
     }
 
@@ -193,7 +189,7 @@
     pixmap.erase(SK_ColorRED, subset);
 
     {
-        sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromPixmap(nullptr, subset, pixmap,
+        sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromPixmap(subset, pixmap,
                                                                  nullptr, nullptr));
         test_image(img, reporter, nullptr, false, kPad, kFullSize);
     }
@@ -222,20 +218,19 @@
     {
         // raster
         sk_sp<SkSpecialImage> rasterImage(SkSpecialImage::MakeFromRaster(
-                                                                        nullptr,
                                                                         SkIRect::MakeWH(kFullSize,
                                                                                         kFullSize),
                                                                         bm));
 
         {
-            sk_sp<SkSpecialImage> fromRaster(rasterImage->makeTextureImage(nullptr, context));
+            sk_sp<SkSpecialImage> fromRaster(rasterImage->makeTextureImage(context));
             test_texture_backed(reporter, rasterImage, fromRaster);
         }
 
         {
             sk_sp<SkSpecialImage> subRasterImage(rasterImage->makeSubset(subset));
 
-            sk_sp<SkSpecialImage> fromSubRaster(subRasterImage->makeTextureImage(nullptr, context));
+            sk_sp<SkSpecialImage> fromSubRaster(subRasterImage->makeTextureImage(context));
             test_texture_backed(reporter, subRasterImage, fromSubRaster);
         }
     }
@@ -257,21 +252,20 @@
         }
 
         sk_sp<SkSpecialImage> gpuImage(SkSpecialImage::MakeFromGpu(
-                                                                nullptr,
                                                                 SkIRect::MakeWH(kFullSize,
                                                                                 kFullSize),
                                                                 kNeedNewImageUniqueID_SpecialImage,
                                                                 texture));
 
         {
-            sk_sp<SkSpecialImage> fromGPU(gpuImage->makeTextureImage(nullptr, context));
+            sk_sp<SkSpecialImage> fromGPU(gpuImage->makeTextureImage(context));
             test_texture_backed(reporter, gpuImage, fromGPU);
         }
 
         {
             sk_sp<SkSpecialImage> subGPUImage(gpuImage->makeSubset(subset));
 
-            sk_sp<SkSpecialImage> fromSubGPU(subGPUImage->makeTextureImage(nullptr, context));
+            sk_sp<SkSpecialImage> fromSubGPU(subGPUImage->makeTextureImage(context));
             test_texture_backed(reporter, subGPUImage, fromSubGPU);
         }
     }
@@ -295,7 +289,6 @@
     }
 
     sk_sp<SkSpecialImage> fullSImg(SkSpecialImage::MakeFromGpu(
-                                                            nullptr,
                                                             SkIRect::MakeWH(kFullSize, kFullSize),
                                                             kNeedNewImageUniqueID_SpecialImage,
                                                             texture));
@@ -304,7 +297,7 @@
 
     {
         sk_sp<SkSpecialImage> subSImg1(SkSpecialImage::MakeFromGpu(
-                                                               nullptr, subset,
+                                                               subset,
                                                                kNeedNewImageUniqueID_SpecialImage,
                                                                texture));
         test_image(subSImg1, reporter, context, true, kPad, kFullSize);
diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp
index db1aaf0..7169b5e 100644
--- a/tests/SpecialSurfaceTest.cpp
+++ b/tests/SpecialSurfaceTest.cpp
@@ -20,10 +20,6 @@
     static const SkIRect& Subset(const SkSpecialSurface* surf) {
         return surf->subset();
     }
-
-    static const SkIRect& Subset(const SkSpecialImage* img) {
-        return img->subset();
-    }
 };
 
 // Both 'kSmallerSize' and 'kFullSize' need to be a non-power-of-2 to exercise
@@ -51,7 +47,7 @@
     sk_sp<SkSpecialImage> img(surf->makeImageSnapshot());
     REPORTER_ASSERT(reporter, img);
 
-    const SkIRect imgSubset = TestingSpecialSurfaceAccess::Subset(img.get());
+    const SkIRect imgSubset = img->subset();
     REPORTER_ASSERT(reporter, surfSubset == imgSubset);
 
     // the canvas was invalidated by the newImageSnapshot call
@@ -61,7 +57,7 @@
 DEF_TEST(SpecialSurface_Raster, reporter) {
 
     SkImageInfo info = SkImageInfo::MakeN32(kSmallerSize, kSmallerSize, kOpaque_SkAlphaType);
-    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRaster(nullptr, info));
+    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRaster(info));
 
     test_surface(surf, reporter, 0);
 }
@@ -73,7 +69,7 @@
 
     const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
-    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromBitmap(nullptr, subset, bm));
+    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromBitmap(subset, bm));
 
     test_surface(surf, reporter, kPad);
 
@@ -89,8 +85,7 @@
     desc.fWidth  = kSmallerSize;
     desc.fHeight = kSmallerSize;
 
-    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(nullptr, ctxInfo.fGrContext,
-                                                                    desc));
+    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeRenderTarget(ctxInfo.fGrContext, desc));
 
     test_surface(surf, reporter, 0);
 }
@@ -108,7 +103,7 @@
 
     const SkIRect subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize);
 
-    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(nullptr, subset, temp));
+    sk_sp<SkSpecialSurface> surf(SkSpecialSurface::MakeFromTexture(subset, temp));
 
     test_surface(surf, reporter, kPad);
 
diff --git a/tests/TestingSpecialImageAccess.h b/tests/TestingSpecialImageAccess.h
deleted file mode 100644
index 64a6d29..0000000
--- a/tests/TestingSpecialImageAccess.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file
- */
-
-#ifndef TestingSpecialImageAccess_DEFINED
-#define TestingSpecialImageAccess_DEFINED
-
-class TestingSpecialImageAccess {
-public:
-    static const SkIRect& Subset(const SkSpecialImage* img) {
-        return img->subset();
-    }
-};
-
-#endif