Retract GrSurfaceDrawContext.h a bit

This CL just pulls GrSurfaceDrawContext.h out of headers and .cpp files where possible.

TBR=brianosman@google.com
Bug: skia:11837
Change-Id: Ib96f3619e3a50091516f81ae48f956fe83c05aff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431384
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/bench/GlyphQuadFillBench.cpp b/bench/GlyphQuadFillBench.cpp
index 269cc9b..a53679c 100644
--- a/bench/GlyphQuadFillBench.cpp
+++ b/bench/GlyphQuadFillBench.cpp
@@ -12,7 +12,6 @@
 #include "include/gpu/GrRecordingContext.h"
 #include "src/core/SkUtils.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/text/GrStrikeCache.h"
 #include "src/gpu/text/GrTextBlob.h"
diff --git a/gm/clear_swizzle.cpp b/gm/clear_swizzle.cpp
index 5cc72ed..abcd815 100644
--- a/gm/clear_swizzle.cpp
+++ b/gm/clear_swizzle.cpp
@@ -10,7 +10,7 @@
 #include "include/core/SkRect.h"
 #include "include/private/SkColorData.h"
 #include "src/core/SkCanvasPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrSwizzle.h"
 
 namespace skiagm {
@@ -24,24 +24,24 @@
         return DrawResult::kSkip;
     }
 
-    auto sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas);
-    if (!sdc) {
+    auto sfc = SkCanvasPriv::TopDeviceSurfaceFillContext(canvas);
+    if (!sfc) {
         *errorMsg = GM::kErrorMsg_DrawSkippedGpuOnly;
         return DrawResult::kSkip;
     }
 
     auto make_offscreen = [&](const SkISize dimensions) {
-        GrSwizzle readSwizzle  = GrSwizzle::Concat(sdc->readSwizzle(), GrSwizzle{"bgra"});
-        GrSwizzle writeSwizzle = GrSwizzle::Concat(sdc->readSwizzle(), GrSwizzle{"bgra"});
+        GrSwizzle readSwizzle  = GrSwizzle::Concat(sfc->readSwizzle(), GrSwizzle{"bgra"});
+        GrSwizzle writeSwizzle = GrSwizzle::Concat(sfc->readSwizzle(), GrSwizzle{"bgra"});
         return GrSurfaceFillContext::Make(rContext,
                                           kPremul_SkAlphaType,
-                                          sdc->colorInfo().refColorSpace(),
+                                          sfc->colorInfo().refColorSpace(),
                                           dimensions,
                                           SkBackingFit::kExact,
-                                          sdc->asSurfaceProxy()->backendFormat(),
+                                          sfc->asSurfaceProxy()->backendFormat(),
                                           /* sample count*/ 1,
                                           GrMipmapped::kNo,
-                                          sdc->asSurfaceProxy()->isProtected(),
+                                          sfc->asSurfaceProxy()->isProtected(),
                                           readSwizzle,
                                           writeSwizzle,
                                           kTopLeft_GrSurfaceOrigin,
@@ -60,7 +60,7 @@
 
     // onscreen for reference
     for (const auto& c : clears) {
-        sdc->clear(c.rect, c.color);
+        sfc->clear(c.rect, c.color);
     }
 
     // partial clear offscreen
@@ -68,7 +68,7 @@
     for (const auto& c : clears) {
         offscreen->clear(c.rect, c.color);
     }
-    sdc->blitTexture(offscreen->readSurfaceView(),
+    sfc->blitTexture(offscreen->readSurfaceView(),
                      SkIRect::MakeSize({2*kSize, 2*kSize}),
                      SkIPoint{2*kSize, 0});
 
@@ -76,7 +76,7 @@
     for (const auto& c : clears) {
         offscreen = make_offscreen(c.rect.size());
         offscreen->clear(SkIRect::MakeSize(c.rect.size()), c.color);
-        sdc->blitTexture(offscreen->readSurfaceView(),
+        sfc->blitTexture(offscreen->readSurfaceView(),
                          SkIRect::MakeSize(offscreen->dimensions()),
                          c.rect.topLeft() + SkIPoint{4*kSize, 0});
     }
diff --git a/gm/gpu_blur_utils.cpp b/gm/gpu_blur_utils.cpp
index a48ba12..21ad6d5 100644
--- a/gm/gpu_blur_utils.cpp
+++ b/gm/gpu_blur_utils.cpp
@@ -13,6 +13,7 @@
 #include "src/core/SkGpuBlurUtils.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrBlendFragmentProcessor.h"
 #include "src/gpu/effects/GrTextureEffect.h"
@@ -58,8 +59,8 @@
                           SkIPoint offset,
                           SkTileMode mode) {
         GrImageInfo info(GrColorType::kRGBA_8888, kPremul_SkAlphaType, nullptr, resultSize);
-        auto fc = GrSurfaceFillContext::Make(ctx, info);
-        if (!fc) {
+        auto sfc = GrSurfaceFillContext::Make(ctx, info);
+        if (!sfc) {
             return GrSurfaceProxyView{};
         }
         GrSamplerState sampler(SkTileModeToWrapMode(mode), SkFilterMode::kNearest);
@@ -69,8 +70,8 @@
                                               sampler,
                                               SkRect::Make(srcTileRect),
                                               *ctx->priv().caps());
-        fc->fillWithFP(std::move(fp));
-        return fc->readSurfaceView();
+        sfc->fillWithFP(std::move(fp));
+        return sfc->readSurfaceView();
     };
 
     SkIPoint outset = {SkGpuBlurUtils::SigmaRadius(sigmaX), SkGpuBlurUtils::SigmaRadius(sigmaY)};
diff --git a/gn/gm.gni b/gn/gm.gni
index 3c36037..302a69b 100644
--- a/gn/gm.gni
+++ b/gn/gm.gni
@@ -72,6 +72,7 @@
   "$_gm/circle_sizes.cpp",
   "$_gm/circulararcs.cpp",
   "$_gm/circularclips.cpp",
+  "$_gm/clear_swizzle.cpp",
   "$_gm/clip_error.cpp",
   "$_gm/clip_sierpinski_region.cpp",
   "$_gm/clip_strokerect.cpp",
@@ -403,7 +404,6 @@
   "$_gm/aarecteffect.cpp",
   "$_gm/beziereffects.cpp",
   "$_gm/bigrrectaaeffect.cpp",
-  "$_gm/clear_swizzle.cpp",
   "$_gm/clockwise.cpp",
   "$_gm/constcolorprocessor.cpp",
   "$_gm/convexpolyeffect.cpp",
diff --git a/gn/gpu.gni b/gn/gpu.gni
index d318b7c..27f7fb7 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -326,8 +326,6 @@
   "$_src/gpu/geometry/GrWangsFormula.h",
   "$_src/gpu/ops/GrAAConvexTessellator.cpp",
   "$_src/gpu/ops/GrAAConvexTessellator.h",
-  "$_src/gpu/ops/GrAtlasPathRenderer.cpp",
-  "$_src/gpu/ops/GrAtlasPathRenderer.h",
   "$_src/gpu/ops/GrAtlasTextOp.cpp",
   "$_src/gpu/ops/GrAtlasTextOp.h",
   "$_src/gpu/ops/GrClearOp.cpp",
@@ -580,6 +578,8 @@
   "$_src/gpu/ops/GrAALinearizingConvexPathRenderer.h",
   "$_src/gpu/ops/GrAtlasInstancedHelper.cpp",
   "$_src/gpu/ops/GrAtlasInstancedHelper.h",
+  "$_src/gpu/ops/GrAtlasPathRenderer.cpp",
+  "$_src/gpu/ops/GrAtlasPathRenderer.h",
   "$_src/gpu/ops/GrDashLinePathRenderer.cpp",
   "$_src/gpu/ops/GrDashLinePathRenderer.h",
   "$_src/gpu/ops/GrDefaultPathRenderer.cpp",
diff --git a/include/gpu/GrDirectContext.h b/include/gpu/GrDirectContext.h
index 807d1b3..a65f0bf 100644
--- a/include/gpu/GrDirectContext.h
+++ b/include/gpu/GrDirectContext.h
@@ -29,7 +29,6 @@
 class GrPath;
 class GrResourceCache;
 class GrSmallPathAtlasMgr;
-class GrSurfaceDrawContext;
 class GrResourceProvider;
 class GrStrikeCache;
 class GrSurfaceProxy;
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp
index 1d2d966..8943fdb 100644
--- a/src/core/SkGpuBlurUtils.cpp
+++ b/src/core/SkGpuBlurUtils.cpp
@@ -14,6 +14,7 @@
 #include "include/gpu/GrRecordingContext.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrRecordingContextPriv.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h"
 #include "src/gpu/effects/GrMatrixConvolutionEffect.h"
diff --git a/src/core/SkGpuBlurUtils.h b/src/core/SkGpuBlurUtils.h
index c11e6af..1ef470d 100644
--- a/src/core/SkGpuBlurUtils.h
+++ b/src/core/SkGpuBlurUtils.h
@@ -11,9 +11,12 @@
 #include "include/core/SkTypes.h"
 
 #if SK_SUPPORT_GPU
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "include/core/SkRefCnt.h"
+#include "include/private/GrTypesPriv.h"
 
 class GrRecordingContext;
+class GrSurfaceDrawContext;
+class GrSurfaceProxyView;
 class GrTexture;
 
 struct SkRect;
@@ -35,7 +38,7 @@
  * @param srcView         The source to be blurred.
  * @param srcColorType    The colorType of srcProxy
  * @param srcAlphaType    The alphaType of srcProxy
- * @param colorSpace      Color space of the source.
+ * @param srcColorSpace   Color space of the source.
  * @param dstBounds       The destination bounds, relative to the source texture.
  * @param srcBounds       The source bounds, relative to the source texture's offset. No pixels
  *                        will be sampled outside of this rectangle.
@@ -45,11 +48,11 @@
  * @param fit             backing fit for the returned render target context
  * @return                The surfaceDrawContext containing the blurred result.
  */
-std::unique_ptr<GrSurfaceDrawContext> GaussianBlur(GrRecordingContext* context,
+std::unique_ptr<GrSurfaceDrawContext> GaussianBlur(GrRecordingContext*,
                                                    GrSurfaceProxyView srcView,
                                                    GrColorType srcColorType,
                                                    SkAlphaType srcAlphaType,
-                                                   sk_sp<SkColorSpace> colorSpace,
+                                                   sk_sp<SkColorSpace> srcColorSpace,
                                                    SkIRect dstBounds,
                                                    SkIRect srcBounds,
                                                    float sigmaX,
@@ -67,14 +70,16 @@
 //   rectXs, rectYs - the x & y coordinates of the covering geometry lattice
 //   texXs, texYs - the texture coordinate at each point in rectXs & rectYs
 // It returns true if 'devRRect' is nine-patchable
-bool ComputeBlurredRRectParams(const SkRRect& srcRRect, const SkRRect& devRRect,
-                                SkScalar sigma, SkScalar xformedSigma,
-                                SkRRect* rrectToDraw,
-                                SkISize* widthHeight,
-                                SkScalar rectXs[kBlurRRectMaxDivisions],
-                                SkScalar rectYs[kBlurRRectMaxDivisions],
-                                SkScalar texXs[kBlurRRectMaxDivisions],
-                                SkScalar texYs[kBlurRRectMaxDivisions]);
+bool ComputeBlurredRRectParams(const SkRRect& srcRRect,
+                               const SkRRect& devRRect,
+                               SkScalar sigma,
+                               SkScalar xformedSigma,
+                               SkRRect* rrectToDraw,
+                               SkISize* widthHeight,
+                               SkScalar rectXs[kBlurRRectMaxDivisions],
+                               SkScalar rectYs[kBlurRRectMaxDivisions],
+                               SkScalar texXs[kBlurRRectMaxDivisions],
+                               SkScalar texYs[kBlurRRectMaxDivisions]);
 
 int CreateIntegralTable(float sixSigma, SkBitmap* table);
 
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 06beb74..2df25da 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -25,7 +25,7 @@
 #include "src/gpu/GrColorSpaceXform.h"
 #include "src/gpu/GrDirectContextPriv.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
 #endif
@@ -581,7 +581,7 @@
 }
 
 #if SK_SUPPORT_GPU
-sk_sp<SkSpecialImage> SkImageFilter_Base::DrawWithFP(GrRecordingContext* context,
+sk_sp<SkSpecialImage> SkImageFilter_Base::DrawWithFP(GrRecordingContext* rContext,
                                                      std::unique_ptr<GrFragmentProcessor> fp,
                                                      const SkIRect& bounds,
                                                      SkColorType colorType,
@@ -593,27 +593,27 @@
                      sk_ref_sp(colorSpace),
                      bounds.size());
 
-    auto surfaceFillContext = GrSurfaceFillContext::Make(context,
-                                                         info,
-                                                         SkBackingFit::kApprox,
-                                                         1,
-                                                         GrMipmapped::kNo,
-                                                         isProtected,
-                                                         kBottomLeft_GrSurfaceOrigin);
-    if (!surfaceFillContext) {
+    auto sfc = GrSurfaceFillContext::Make(rContext,
+                                          info,
+                                          SkBackingFit::kApprox,
+                                          1,
+                                          GrMipmapped::kNo,
+                                          isProtected,
+                                          kBottomLeft_GrSurfaceOrigin);
+    if (!sfc) {
         return nullptr;
     }
 
     SkIRect dstIRect = SkIRect::MakeWH(bounds.width(), bounds.height());
     SkRect srcRect = SkRect::Make(bounds);
-    surfaceFillContext->fillRectToRectWithFP(srcRect, dstIRect, std::move(fp));
+    sfc->fillRectToRectWithFP(srcRect, dstIRect, std::move(fp));
 
-    return SkSpecialImage::MakeDeferredFromGpu(context,
+    return SkSpecialImage::MakeDeferredFromGpu(rContext,
                                                dstIRect,
                                                kNeedNewImageUniqueID_SpecialImage,
-                                               surfaceFillContext->readSurfaceView(),
-                                               surfaceFillContext->colorInfo().colorType(),
-                                               surfaceFillContext->colorInfo().refColorSpace(),
+                                               sfc->readSurfaceView(),
+                                               sfc->colorInfo().colorType(),
+                                               sfc->colorInfo().refColorSpace(),
                                                surfaceProps);
 }
 
diff --git a/src/effects/imagefilters/SkArithmeticImageFilter.cpp b/src/effects/imagefilters/SkArithmeticImageFilter.cpp
index fe903e9..964c40a 100644
--- a/src/effects/imagefilters/SkArithmeticImageFilter.cpp
+++ b/src/effects/imagefilters/SkArithmeticImageFilter.cpp
@@ -20,7 +20,7 @@
 #include "src/core/SkRuntimeEffectPriv.h"
 #include "src/gpu/GrColorSpaceXform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrSkSLFP.h"
@@ -341,19 +341,19 @@
         const SkIRect& bounds) const {
     SkASSERT(ctx.gpuBacked());
 
-    auto context = ctx.getContext();
+    auto rContext = ctx.getContext();
 
     GrSurfaceProxyView backgroundView, foregroundView;
 
     GrProtected isProtected = GrProtected::kNo;
     if (background) {
-        backgroundView = background->view(context);
+        backgroundView = background->view(rContext);
         SkASSERT(backgroundView.proxy());
         isProtected = backgroundView.proxy()->isProtected();
     }
 
     if (foreground) {
-        foregroundView = foreground->view(context);
+        foregroundView = foreground->view(rContext);
         SkASSERT(foregroundView.proxy());
         isProtected = foregroundView.proxy()->isProtected();
     }
@@ -403,26 +403,25 @@
     }
 
     GrImageInfo info(ctx.grColorType(), kPremul_SkAlphaType, ctx.refColorSpace(), bounds.size());
-    auto surfaceFillContext = GrSurfaceFillContext::Make(context,
-                                                         info,
-                                                         SkBackingFit::kApprox,
-                                                         1,
-                                                         GrMipmapped::kNo,
-                                                         isProtected,
-                                                         kBottomLeft_GrSurfaceOrigin);
-    if (!surfaceFillContext) {
+    auto sfc = GrSurfaceFillContext::Make(rContext,
+                                          info,
+                                          SkBackingFit::kApprox,
+                                          1,
+                                          GrMipmapped::kNo,
+                                          isProtected,
+                                          kBottomLeft_GrSurfaceOrigin);
+    if (!sfc) {
         return nullptr;
     }
 
-    surfaceFillContext->fillRectToRectWithFP(bounds, SkIRect::MakeSize(bounds.size()),
-                                             std::move(fp));
+    sfc->fillRectToRectWithFP(bounds, SkIRect::MakeSize(bounds.size()), std::move(fp));
 
-    return SkSpecialImage::MakeDeferredFromGpu(context,
+    return SkSpecialImage::MakeDeferredFromGpu(rContext,
                                                SkIRect::MakeWH(bounds.width(), bounds.height()),
                                                kNeedNewImageUniqueID_SpecialImage,
-                                               surfaceFillContext->readSurfaceView(),
-                                               surfaceFillContext->colorInfo().colorType(),
-                                               surfaceFillContext->colorInfo().refColorSpace(),
+                                               sfc->readSurfaceView(),
+                                               sfc->colorInfo().colorType(),
+                                               sfc->colorInfo().refColorSpace(),
                                                ctx.surfaceProps());
 }
 #endif
diff --git a/src/effects/imagefilters/SkBlendImageFilter.cpp b/src/effects/imagefilters/SkBlendImageFilter.cpp
index d5ea792..a5a40f3 100644
--- a/src/effects/imagefilters/SkBlendImageFilter.cpp
+++ b/src/effects/imagefilters/SkBlendImageFilter.cpp
@@ -19,7 +19,7 @@
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrColorSpaceXform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrTextureEffect.h"
@@ -239,16 +239,16 @@
                                                          const SkIRect& bounds) const {
     SkASSERT(ctx.gpuBacked());
 
-    auto context = ctx.getContext();
+    auto rContext = ctx.getContext();
 
     GrSurfaceProxyView backgroundView, foregroundView;
 
     if (background) {
-        backgroundView = background->view(context);
+        backgroundView = background->view(rContext);
     }
 
     if (foreground) {
-        foregroundView = foreground->view(context);
+        foregroundView = foreground->view(rContext);
     }
 
     std::unique_ptr<GrFragmentProcessor> fp;
@@ -284,21 +284,19 @@
     }
 
     GrImageInfo info(ctx.grColorType(), kPremul_SkAlphaType, ctx.refColorSpace(), bounds.size());
-    auto surfaceFillContext = GrSurfaceFillContext::Make(context, info, SkBackingFit::kApprox);
-    if (!surfaceFillContext) {
+    auto sfc = GrSurfaceFillContext::Make(rContext, info, SkBackingFit::kApprox);
+    if (!sfc) {
         return nullptr;
     }
 
-    surfaceFillContext->fillRectToRectWithFP(bounds,
-                                             SkIRect::MakeSize(bounds.size()),
-                                             std::move(fp));
+    sfc->fillRectToRectWithFP(bounds, SkIRect::MakeSize(bounds.size()), std::move(fp));
 
-    return SkSpecialImage::MakeDeferredFromGpu(context,
+    return SkSpecialImage::MakeDeferredFromGpu(rContext,
                                                SkIRect::MakeWH(bounds.width(), bounds.height()),
                                                kNeedNewImageUniqueID_SpecialImage,
-                                               surfaceFillContext->readSurfaceView(),
-                                               surfaceFillContext->colorInfo().colorType(),
-                                               surfaceFillContext->colorInfo().refColorSpace(),
+                                               sfc->readSurfaceView(),
+                                               sfc->colorInfo().colorType(),
+                                               sfc->colorInfo().refColorSpace(),
                                                ctx.surfaceProps());
 }
 
diff --git a/src/effects/imagefilters/SkBlurImageFilter.cpp b/src/effects/imagefilters/SkBlurImageFilter.cpp
index e99020d..87f0138 100644
--- a/src/effects/imagefilters/SkBlurImageFilter.cpp
+++ b/src/effects/imagefilters/SkBlurImageFilter.cpp
@@ -24,6 +24,7 @@
 #include "src/core/SkWriteBuffer.h"
 
 #if SK_SUPPORT_GPU
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
 #endif
diff --git a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
index f9b87be..15d5b0f 100644
--- a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
+++ b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
@@ -19,7 +19,7 @@
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrColorSpaceXform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
@@ -315,29 +315,29 @@
                          kPremul_SkAlphaType,
                          ctx.refColorSpace(),
                          bounds.size());
-        auto surfaceFillContext = GrSurfaceFillContext::Make(context,
-                                                             info,
-                                                             SkBackingFit::kApprox,
-                                                             1,
-                                                             GrMipmapped::kNo,
-                                                             isProtected,
-                                                             kBottomLeft_GrSurfaceOrigin);
-        if (!surfaceFillContext) {
+        auto sfc = GrSurfaceFillContext::Make(context,
+                                              info,
+                                              SkBackingFit::kApprox,
+                                              1,
+                                              GrMipmapped::kNo,
+                                              isProtected,
+                                              kBottomLeft_GrSurfaceOrigin);
+        if (!sfc) {
             return nullptr;
         }
 
-        surfaceFillContext->fillRectToRectWithFP(colorBounds,
-                                                 SkIRect::MakeSize(colorBounds.size()),
-                                                 std::move(fp));
+        sfc->fillRectToRectWithFP(colorBounds,
+                                  SkIRect::MakeSize(colorBounds.size()),
+                                  std::move(fp));
 
         offset->fX = bounds.left();
         offset->fY = bounds.top();
         return SkSpecialImage::MakeDeferredFromGpu(context,
                                                    SkIRect::MakeWH(bounds.width(), bounds.height()),
                                                    kNeedNewImageUniqueID_SpecialImage,
-                                                   surfaceFillContext->readSurfaceView(),
-                                                   surfaceFillContext->colorInfo().colorType(),
-                                                   surfaceFillContext->colorInfo().refColorSpace(),
+                                                   sfc->readSurfaceView(),
+                                                   sfc->colorInfo().colorType(),
+                                                   sfc->colorInfo().refColorSpace(),
                                                    ctx.surfaceProps());
     }
 #endif
diff --git a/src/effects/imagefilters/SkLightingImageFilter.cpp b/src/effects/imagefilters/SkLightingImageFilter.cpp
index ea8017c..20a3cb9 100644
--- a/src/effects/imagefilters/SkLightingImageFilter.cpp
+++ b/src/effects/imagefilters/SkLightingImageFilter.cpp
@@ -22,7 +22,7 @@
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/gpu/GrPaint.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
@@ -454,7 +454,7 @@
 };
 
 #if SK_SUPPORT_GPU
-void SkLightingImageFilterInternal::drawRect(GrSurfaceFillContext* surfaceFillContext,
+void SkLightingImageFilterInternal::drawRect(GrSurfaceFillContext* sfc,
                                              GrSurfaceProxyView srcView,
                                              const SkMatrix& matrix,
                                              const SkIRect& dstRect,
@@ -463,8 +463,8 @@
                                              const SkIRect& bounds) const {
     SkIRect srcRect = dstRect.makeOffset(bounds.topLeft());
     auto fp = this->makeFragmentProcessor(std::move(srcView), matrix, srcBounds, boundaryMode,
-                                          *surfaceFillContext->caps());
-    surfaceFillContext->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
+                                          *sfc->caps());
+    sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
 }
 
 sk_sp<SkSpecialImage> SkLightingImageFilterInternal::filterImageGPU(
@@ -474,23 +474,23 @@
                                                    const SkMatrix& matrix) const {
     SkASSERT(ctx.gpuBacked());
 
-    auto context = ctx.getContext();
+    auto rContext = ctx.getContext();
 
-    GrSurfaceProxyView inputView = input->view(context);
+    GrSurfaceProxyView inputView = input->view(rContext);
     SkASSERT(inputView.asTextureProxy());
 
     GrImageInfo info(ctx.grColorType(),
                      kPremul_SkAlphaType,
                      ctx.refColorSpace(),
                      offsetBounds.size());
-    auto surfaceFillContext = GrSurfaceFillContext::Make(context,
-                                                         info,
-                                                         SkBackingFit::kApprox,
-                                                         1,
-                                                         GrMipmapped::kNo,
-                                                         inputView.proxy()->isProtected(),
-                                                         kBottomLeft_GrSurfaceOrigin);
-    if (!surfaceFillContext) {
+    auto sfc = GrSurfaceFillContext::Make(rContext,
+                                          info,
+                                          SkBackingFit::kApprox,
+                                          1,
+                                          GrMipmapped::kNo,
+                                          inputView.proxy()->isProtected(),
+                                          kBottomLeft_GrSurfaceOrigin);
+    if (!sfc) {
         return nullptr;
     }
 
@@ -508,32 +508,32 @@
     SkIRect bottomRight = SkIRect::MakeXYWH(dstRect.width() - 1, dstRect.height() - 1, 1, 1);
 
     const SkIRect* pSrcBounds = inputBounds.contains(offsetBounds) ? nullptr : &inputBounds;
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, topLeft,
+    this->drawRect(sfc.get(), inputView, matrix, topLeft,
                    kTopLeft_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, top,
+    this->drawRect(sfc.get(), inputView, matrix, top,
                    kTop_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, topRight,
+    this->drawRect(sfc.get(), inputView, matrix, topRight,
                    kTopRight_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, left,
+    this->drawRect(sfc.get(), inputView, matrix, left,
                    kLeft_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, interior,
+    this->drawRect(sfc.get(), inputView, matrix, interior,
                    kInterior_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, right,
+    this->drawRect(sfc.get(), inputView, matrix, right,
                    kRight_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, bottomLeft,
+    this->drawRect(sfc.get(), inputView, matrix, bottomLeft,
                    kBottomLeft_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), inputView, matrix, bottom,
+    this->drawRect(sfc.get(), inputView, matrix, bottom,
                    kBottom_BoundaryMode, pSrcBounds, offsetBounds);
-    this->drawRect(surfaceFillContext.get(), std::move(inputView), matrix, bottomRight,
+    this->drawRect(sfc.get(), std::move(inputView), matrix, bottomRight,
                    kBottomRight_BoundaryMode, pSrcBounds, offsetBounds);
 
     return SkSpecialImage::MakeDeferredFromGpu(
-            context,
+            rContext,
             SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()),
             kNeedNewImageUniqueID_SpecialImage,
-            surfaceFillContext->readSurfaceView(),
-            surfaceFillContext->colorInfo().colorType(),
-            surfaceFillContext->colorInfo().refColorSpace(),
+            sfc->readSurfaceView(),
+            sfc->colorInfo().colorType(),
+            sfc->colorInfo().refColorSpace(),
             ctx.surfaceProps());
 }
 #endif
diff --git a/src/effects/imagefilters/SkMorphologyImageFilter.cpp b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
index 5d97be0..ea9b6d3 100644
--- a/src/effects/imagefilters/SkMorphologyImageFilter.cpp
+++ b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
@@ -18,7 +18,7 @@
 #include "include/gpu/GrRecordingContext.h"
 #include "src/gpu/GrDirectContextPriv.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/SkGr.h"
@@ -356,7 +356,7 @@
 }
 #endif
 
-static void apply_morphology_rect(GrSurfaceFillContext* surfaceFillContext,
+static void apply_morphology_rect(GrSurfaceFillContext* sfc,
                                   GrSurfaceProxyView view,
                                   SkAlphaType srcAlphaType,
                                   const SkIRect& srcRect,
@@ -372,10 +372,10 @@
                                        radius,
                                        morphType,
                                        range);
-    surfaceFillContext->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
+    sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
 }
 
-static void apply_morphology_rect_no_bounds(GrSurfaceFillContext* surfaceFillContext,
+static void apply_morphology_rect_no_bounds(GrSurfaceFillContext* sfc,
                                             GrSurfaceProxyView view,
                                             SkAlphaType srcAlphaType,
                                             const SkIRect& srcRect,
@@ -385,10 +385,10 @@
                                             MorphDirection direction) {
     auto fp = GrMorphologyEffect::Make(
             /*inputFP=*/nullptr, std::move(view), srcAlphaType, direction, radius, morphType);
-    surfaceFillContext->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
+    sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp));
 }
 
-static void apply_morphology_pass(GrSurfaceFillContext* surfaceFillContext,
+static void apply_morphology_pass(GrSurfaceFillContext* sfc,
                                   GrSurfaceProxyView view,
                                   SkAlphaType srcAlphaType,
                                   const SkIRect& srcRect,
@@ -421,23 +421,23 @@
     }
     if (middleSrcRect.width() <= 0) {
         // radius covers srcRect; use bounds over entire draw
-        apply_morphology_rect(surfaceFillContext, std::move(view), srcAlphaType, srcRect,
+        apply_morphology_rect(sfc, std::move(view), srcAlphaType, srcRect,
                               dstRect, radius, morphType, bounds, direction);
     } else {
         // Draw upper and lower margins with bounds; middle without.
-        apply_morphology_rect(surfaceFillContext, view, srcAlphaType, lowerSrcRect,
+        apply_morphology_rect(sfc, view, srcAlphaType, lowerSrcRect,
                               lowerDstRect, radius, morphType, bounds, direction);
-        apply_morphology_rect(surfaceFillContext, view, srcAlphaType, upperSrcRect,
+        apply_morphology_rect(sfc, view, srcAlphaType, upperSrcRect,
                               upperDstRect, radius, morphType, bounds, direction);
-        apply_morphology_rect_no_bounds(surfaceFillContext, std::move(view), srcAlphaType,
+        apply_morphology_rect_no_bounds(sfc, std::move(view), srcAlphaType,
                                         middleSrcRect, middleDstRect, radius, morphType, direction);
     }
 }
 
 static sk_sp<SkSpecialImage> apply_morphology(
-        GrRecordingContext* context, SkSpecialImage* input, const SkIRect& rect,
+        GrRecordingContext* rContext, SkSpecialImage* input, const SkIRect& rect,
         MorphType morphType, SkISize radius, const SkImageFilter_Base::Context& ctx) {
-    GrSurfaceProxyView srcView = input->view(context);
+    GrSurfaceProxyView srcView = input->view(rContext);
     SkAlphaType srcAlphaType = input->alphaType();
     SkASSERT(srcView.asTextureProxy());
     sk_sp<SkColorSpace> colorSpace = ctx.refColorSpace();
@@ -453,7 +453,7 @@
 
     if (radius.fWidth > 0) {
         GrImageInfo info(colorType, kPremul_SkAlphaType, colorSpace, rect.size());
-        auto dstFillContext = GrSurfaceFillContext::Make(context,
+        auto dstFillContext = GrSurfaceFillContext::Make(rContext,
                                                          info,
                                                          SkBackingFit::kApprox,
                                                          1,
@@ -478,7 +478,7 @@
     }
     if (radius.fHeight > 0) {
         GrImageInfo info(colorType, kPremul_SkAlphaType, colorSpace, rect.size());
-        auto dstFillContext = GrSurfaceFillContext::Make(context,
+        auto dstFillContext = GrSurfaceFillContext::Make(rContext,
                                                          info,
                                                          SkBackingFit::kApprox,
                                                          1,
@@ -495,7 +495,7 @@
         srcView = dstFillContext->readSurfaceView();
     }
 
-    return SkSpecialImage::MakeDeferredFromGpu(context,
+    return SkSpecialImage::MakeDeferredFromGpu(rContext,
                                                SkIRect::MakeWH(rect.width(), rect.height()),
                                                kNeedNewImageUniqueID_SpecialImage,
                                                std::move(srcView), colorType,
diff --git a/src/gpu/GrClip.h b/src/gpu/GrClip.h
index 8d2e465..3f5528e 100644
--- a/src/gpu/GrClip.h
+++ b/src/gpu/GrClip.h
@@ -11,7 +11,9 @@
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
 #include "src/gpu/GrAppliedClip.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+
+class GrDrawOp;
+class GrSurfaceDrawContext;
 
 /**
  * GrClip is an abstract base class for applying a clip. It constructs a clip mask if necessary, and
diff --git a/src/gpu/GrClipStack.cpp b/src/gpu/GrClipStack.cpp
index bddd44d..ebf92ae 100644
--- a/src/gpu/GrClipStack.cpp
+++ b/src/gpu/GrClipStack.cpp
@@ -8,6 +8,7 @@
 #include "src/gpu/GrClipStack.h"
 
 #include "include/core/SkMatrix.h"
+#include "src/core/SkMatrixProvider.h"
 #include "src/core/SkPathPriv.h"
 #include "src/core/SkRRectPriv.h"
 #include "src/core/SkRectPriv.h"
@@ -20,6 +21,7 @@
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrSWMaskHelper.h"
 #include "src/gpu/GrStencilMaskHelper.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/effects/GrBlendFragmentProcessor.h"
 #include "src/gpu/effects/GrConvexPolyEffect.h"
 #include "src/gpu/effects/GrRRectEffect.h"
diff --git a/src/gpu/GrClipStack.h b/src/gpu/GrClipStack.h
index e013a2c..c08de63 100644
--- a/src/gpu/GrClipStack.h
+++ b/src/gpu/GrClipStack.h
@@ -22,6 +22,7 @@
 class GrRecordingContext;
 class GrSurfaceDrawContext;
 class GrSWMaskHelper;
+class SkMatrixProvider;
 
 class GrClipStack final : public GrClip {
 public:
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 63c1095..53e8803 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -22,6 +22,7 @@
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrSWMaskHelper.h"
 #include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/effects/GrBlendFragmentProcessor.h"
 #include "src/gpu/effects/GrRRectEffect.h"
diff --git a/src/gpu/GrDirectContextPriv.cpp b/src/gpu/GrDirectContextPriv.cpp
index e8a39d5..ba08749 100644
--- a/src/gpu/GrDirectContextPriv.cpp
+++ b/src/gpu/GrDirectContextPriv.cpp
@@ -16,7 +16,7 @@
 #include "src/gpu/GrMemoryPool.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrSurfaceContext.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrThreadSafePipelineBuilder.h"
 #include "src/gpu/SkGr.h"
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index fcc3b36..3b512f3 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -24,14 +24,13 @@
 #include "src/gpu/GrMemoryPool.h"
 #include "src/gpu/GrOnFlushResourceProvider.h"
 #include "src/gpu/GrOpFlushState.h"
+#include "src/gpu/GrOpsTask.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrRenderTargetProxy.h"
 #include "src/gpu/GrRenderTask.h"
 #include "src/gpu/GrRenderTaskCluster.h"
 #include "src/gpu/GrResourceAllocator.h"
 #include "src/gpu/GrResourceProvider.h"
-#include "src/gpu/GrSurfaceContext.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrSurfaceProxyPriv.h"
 #include "src/gpu/GrTTopoSort.h"
 #include "src/gpu/GrTexture.h"
diff --git a/src/gpu/GrDynamicAtlas.cpp b/src/gpu/GrDynamicAtlas.cpp
index 916a338..7fe35a0 100644
--- a/src/gpu/GrDynamicAtlas.cpp
+++ b/src/gpu/GrDynamicAtlas.cpp
@@ -8,13 +8,15 @@
 #include "src/gpu/GrDynamicAtlas.h"
 
 #include "src/core/SkIPoint16.h"
+#include "src/gpu/GrCaps.h"
 #include "src/gpu/GrOnFlushResourceProvider.h"
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRectanizerPow2.h"
 #include "src/gpu/GrRectanizerSkyline.h"
 #include "src/gpu/GrRenderTarget.h"
 #include "src/gpu/GrResourceProvider.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceProxyPriv.h"
+#include "src/gpu/GrSurfaceProxyView.h"
 
 // Each Node covers a sub-rectangle of the final atlas. When a GrDynamicAtlas runs out of room, we
 // create a new Node the same size as all combined nodes in the atlas as-is, and then place the new
diff --git a/src/gpu/GrOnFlushResourceProvider.cpp b/src/gpu/GrOnFlushResourceProvider.cpp
index 82cc4c9..b5ff040 100644
--- a/src/gpu/GrOnFlushResourceProvider.cpp
+++ b/src/gpu/GrOnFlushResourceProvider.cpp
@@ -14,8 +14,8 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrResourceProvider.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrSurfaceProxy.h"
+#include "src/gpu/GrSurfaceProxyPriv.h"
 #include "src/gpu/GrTextureResolveRenderTask.h"
 
 bool GrOnFlushResourceProvider::instatiateProxy(GrSurfaceProxy* proxy) {
diff --git a/src/gpu/GrReducedClip.h b/src/gpu/GrReducedClip.h
index 9467b2d..3760a6c 100644
--- a/src/gpu/GrReducedClip.h
+++ b/src/gpu/GrReducedClip.h
@@ -15,6 +15,7 @@
 
 class GrRecordingContext;
 class GrSurfaceDrawContext;
+class SkMatrixProvider;
 
 /**
  * This class takes a clip stack and produces a reduced set of elements that are equivalent to
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 885f377..bd96e59 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -21,6 +21,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrSWMaskHelper.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrUtil.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrTextureEffect.h"
diff --git a/src/gpu/GrStencilMaskHelper.cpp b/src/gpu/GrStencilMaskHelper.cpp
index dd74966..0a838a8 100644
--- a/src/gpu/GrStencilMaskHelper.cpp
+++ b/src/gpu/GrStencilMaskHelper.cpp
@@ -11,6 +11,7 @@
 #include "include/core/SkPath.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrStencilSettings.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/effects/GrDisableColorXP.h"
 #include "src/gpu/geometry/GrShape.h"
 #include "src/gpu/geometry/GrStyledShape.h"
@@ -338,6 +339,12 @@
 
 }  // namespace
 
+GrStencilMaskHelper::GrStencilMaskHelper(GrRecordingContext* rContext, GrSurfaceDrawContext* sdc)
+        : fContext(rContext)
+        , fSDC(sdc)
+        , fClip(sdc->dimensions()) {
+}
+
 bool GrStencilMaskHelper::init(const SkIRect& bounds, uint32_t genID,
                                const GrWindowRectangles& windowRects, int numFPs) {
     if (!fSDC->mustRenderClip(genID, bounds, numFPs)) {
diff --git a/src/gpu/GrStencilMaskHelper.h b/src/gpu/GrStencilMaskHelper.h
index 68d90cf..dd2b1c0 100644
--- a/src/gpu/GrStencilMaskHelper.h
+++ b/src/gpu/GrStencilMaskHelper.h
@@ -37,10 +37,7 @@
     // Configure the helper to update the stencil mask within the given rectangle, respecting the
     // set window rectangles. It will use the provided context and render target to draw into, both
     // of which must outlive the helper.
-    GrStencilMaskHelper(GrRecordingContext* context, GrSurfaceDrawContext* sdc)
-            : fContext(context)
-            , fSDC(sdc)
-            , fClip(sdc->dimensions()) {}
+    GrStencilMaskHelper(GrRecordingContext*, GrSurfaceDrawContext*);
 
     // Returns true if the stencil mask must be redrawn
     bool init(const SkIRect& maskBounds, uint32_t genID,
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index e5f9c2d..db96ad6 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -20,7 +20,7 @@
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrResourceProvider.h"
 #include "src/gpu/GrSurface.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureRenderTargetProxy.h"
 
diff --git a/src/gpu/ops/GrAtlasPathRenderer.h b/src/gpu/ops/GrAtlasPathRenderer.h
index 55eb824..dc50e6a 100644
--- a/src/gpu/ops/GrAtlasPathRenderer.h
+++ b/src/gpu/ops/GrAtlasPathRenderer.h
@@ -8,6 +8,10 @@
 #ifndef GrAtlasPathRenderer_DEFINED
 #define GrAtlasPathRenderer_DEFINED
 
+#include "include/gpu/GrTypes.h"
+
+#if SK_GPU_V1
+
 #include "include/private/SkTHash.h"
 #include "src/core/SkIPoint16.h"
 #include "src/gpu/GrDynamicAtlas.h"
@@ -105,4 +109,13 @@
     SkTHashMap<AtlasPathKey, SkIPoint16> fAtlasPathCache;
 };
 
-#endif
+#else // SK_GPU_V1
+
+class GrAtlasPathRenderer {
+public:
+    static bool IsSupported(GrRecordingContext*) { return false; }
+};
+
+#endif // SK_GPU_V1
+
+#endif // GrAtlasPathRenderer_DEFINED
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index be34e51..9385840 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -22,6 +22,7 @@
 #include "src/gpu/GrProgramInfo.h"
 #include "src/gpu/GrSimpleMesh.h"
 #include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrUtil.h"
 #include "src/gpu/effects/GrDisableColorXP.h"
 #include "src/gpu/geometry/GrPathUtils.h"
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index be11ebf..6b476de 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -33,7 +33,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrSemaphore.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "src/gpu/GrTextureProxyPriv.h"
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index faf191e..ab64bad 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -21,7 +21,7 @@
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrResourceProvider.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrYUVATextureProxies.h"
 #include "src/gpu/effects/GrYUVtoRGBEffect.h"
diff --git a/src/image/SkImage_GpuYUVA.cpp b/src/image/SkImage_GpuYUVA.cpp
index c0715a7..19a8e62 100644
--- a/src/image/SkImage_GpuYUVA.cpp
+++ b/src/image/SkImage_GpuYUVA.cpp
@@ -22,7 +22,7 @@
 #include "src/gpu/GrImageContextPriv.h"
 #include "src/gpu/GrProxyProvider.h"
 #include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrSurfaceDrawContext.h"
+#include "src/gpu/GrSurfaceFillContext.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrBicubicEffect.h"
 #include "src/gpu/effects/GrYUVtoRGBEffect.h"
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 0c4122e..e578866 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -32,6 +32,7 @@
 #include "src/gpu/GrClip.h"
 #include "src/gpu/GrDirectContextPriv.h"
 #include "src/gpu/GrResourceCache.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTextureProxy.h"
 #include "tests/Test.h"