Remove GrFragmentProcessor::addCoordTransform()

At this point, every created instance of GrCoordTransform is an identity
so can be removed. Adding it manually using addCoordTransforms() is no
different than relying on the (current) implicitly returned coord
transform if the FP calls setUsesSampleCoordsDirectly().

Removing the addCoordTransform() lets us enforce that this remains the
case and this CL also deletes all of those members that were previously
used to provide access to the sample coordinates.

As part of this, GrFragmentProcessor.h and many other files no longer
need to include GrCoordTransform.h. This exposed a surprising popularity on
SkMatrixPriv.h so I updated those files to include that header directly.

Technically, a .fp file can still have an @coordTransform section and
the sksl generator will try and call addCoordTransform, which will then
fail to build. A follow up CL removes that support in .fp generation.

Bug: skia:10416
Change-Id: I5e4d2bb49ee6d7e56ac75ca00be5631106fec20b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299291
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/gm/fp_sample_chaining.cpp b/gm/fp_sample_chaining.cpp
index 7604856..a13b395 100644
--- a/gm/fp_sample_chaining.cpp
+++ b/gm/fp_sample_chaining.cpp
@@ -146,7 +146,7 @@
     static constexpr GrProcessor::ClassID CLASS_ID = (GrProcessor::ClassID) 7;
 
     TestPatternEffect() : GrFragmentProcessor(CLASS_ID, kNone_OptimizationFlags) {
-        this->addCoordTransform(&fCoordTransform);
+        this->setUsesSampleCoordsDirectly();
     }
 
     const char* name() const override { return "TestPatternEffect"; }
@@ -165,8 +165,6 @@
         };
         return new Impl;
     }
-    // Placeholder identity coord transform to allow access to local coords
-    GrCoordTransform fCoordTransform = {};
 };
 
 SkBitmap make_test_bitmap() {
diff --git a/gm/fpcoordinateoverride.cpp b/gm/fpcoordinateoverride.cpp
index dc44536..1cc440c 100644
--- a/gm/fpcoordinateoverride.cpp
+++ b/gm/fpcoordinateoverride.cpp
@@ -21,7 +21,6 @@
 #include "src/gpu/GrBitmapTextureMaker.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrContextPriv.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrRenderTargetContextPriv.h"
diff --git a/src/effects/imagefilters/SkDisplacementMapEffect.cpp b/src/effects/imagefilters/SkDisplacementMapEffect.cpp
index ca28144..febbf41 100644
--- a/src/effects/imagefilters/SkDisplacementMapEffect.cpp
+++ b/src/effects/imagefilters/SkDisplacementMapEffect.cpp
@@ -18,7 +18,6 @@
 #include "include/private/GrRecordingContext.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrColorSpaceXform.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrTexture.h"
@@ -230,9 +229,6 @@
 
     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
 
-    // We really just want the unaltered local coords, but the only way to get that right now is
-    // an identity coord transform.
-    GrCoordTransform fCoordTransform = {};
     SkColorChannel fXChannelSelector;
     SkColorChannel fYChannelSelector;
     SkVector fScale;
@@ -510,7 +506,7 @@
         , fScale(scale) {
     this->registerChild(std::move(displacement));
     this->registerExplicitlySampledChild(std::move(color));
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 GrDisplacementMapEffect::GrDisplacementMapEffect(const GrDisplacementMapEffect& that)
@@ -519,7 +515,7 @@
         , fYChannelSelector(that.fYChannelSelector)
         , fScale(that.fScale) {
     this->cloneAndRegisterAllChildProcessors(that);
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 GrDisplacementMapEffect::~GrDisplacementMapEffect() {}
diff --git a/src/effects/imagefilters/SkLightingImageFilter.cpp b/src/effects/imagefilters/SkLightingImageFilter.cpp
index 122c02a..4b3232b 100644
--- a/src/effects/imagefilters/SkLightingImageFilter.cpp
+++ b/src/effects/imagefilters/SkLightingImageFilter.cpp
@@ -631,9 +631,6 @@
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
 private:
-    // We really just want the unaltered local coords, but the only way to get that right now is
-    // an identity coord transform.
-    GrCoordTransform fCoordTransform = {};
     sk_sp<const SkImageFilterLight> fLight;
     SkScalar fSurfaceScale;
     SkMatrix fFilterMatrix;
@@ -1633,7 +1630,7 @@
                                       caps);
     }
     this->registerExplicitlySampledChild(std::move(child));
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 GrLightingEffect::GrLightingEffect(const GrLightingEffect& that)
@@ -1643,7 +1640,7 @@
         , fFilterMatrix(that.fFilterMatrix)
         , fBoundaryMode(that.fBoundaryMode) {
     this->cloneAndRegisterAllChildProcessors(that);
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 bool GrLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
diff --git a/src/effects/imagefilters/SkMorphologyImageFilter.cpp b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
index 1131fb0..bdeb6e3 100644
--- a/src/effects/imagefilters/SkMorphologyImageFilter.cpp
+++ b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
@@ -19,7 +19,6 @@
 #include "include/gpu/GrContext.h"
 #include "include/private/GrRecordingContext.h"
 #include "src/gpu/GrContextPriv.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/GrRenderTargetContext.h"
 #include "src/gpu/GrTexture.h"
@@ -235,9 +234,6 @@
     }
 
 private:
-    // We really just want the unaltered local coords, but the only way to get that right now is
-    // an identity coord transform.
-    GrCoordTransform fCoordTransform = {};
     MorphDirection fDirection;
     int fRadius;
     MorphType fType;
@@ -342,7 +338,7 @@
         , fRadius(radius)
         , fType(type)
         , fUseRange(SkToBool(range)) {
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
     auto te = GrTextureEffect::Make(std::move(view), srcAlphaType);
     this->registerExplicitlySampledChild(std::move(te));
     if (fUseRange) {
@@ -357,7 +353,7 @@
         , fRadius(that.fRadius)
         , fType(that.fType)
         , fUseRange(that.fUseRange) {
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
     this->cloneAndRegisterAllChildProcessors(that);
     if (that.fUseRange) {
         fRange[0] = that.fRange[0];
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 22e511e..79611cf 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -69,34 +69,22 @@
 }
 
 int GrFragmentProcessor::numCoordTransforms() const {
-    if (SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) && fCoordTransforms.empty() &&
-        !this->isSampledWithExplicitCoords()) {
+    if (SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) && !this->isSampledWithExplicitCoords()) {
         // coordTransform(0) will return an implicitly defined coord transform so that varyings are
         // added for this FP in order to support const/uniform sample matrix lifting.
         return 1;
     } else {
-        return fCoordTransforms.count();
+        return 0;
     }
 }
 
 const GrCoordTransform& GrFragmentProcessor::coordTransform(int i) const {
-    SkASSERT(i >= 0 && i < this->numCoordTransforms());
-    if (SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) && fCoordTransforms.empty() &&
-        !this->isSampledWithExplicitCoords()) {
-        SkASSERT(i == 0);
-
-        // as things stand, matrices only work when there's a coord transform, so we need to add
-        // an identity transform to keep the downstream code happy
-        static const GrCoordTransform kImplicitIdentity;
-        return kImplicitIdentity;
-    } else {
-        return *fCoordTransforms[i];
-    }
-}
-
-void GrFragmentProcessor::addCoordTransform(GrCoordTransform* transform) {
-    fCoordTransforms.push_back(transform);
-    fFlags |= kHasCoordTransforms_Flag;
+    SkASSERT(i == 0 && SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) &&
+             !this->isSampledWithExplicitCoords());
+    // as things stand, matrices only work when there's a coord transform, so we need to add
+    // an identity transform to keep the downstream code happy
+    static const GrCoordTransform kImplicitIdentity;
+    return kImplicitIdentity;
 }
 
 void GrFragmentProcessor::setSampleMatrix(SkSL::SampleMatrix newMatrix) {
@@ -165,10 +153,6 @@
         child->setSampleMatrix(sampleMatrix);
     }
 
-    if (child->fFlags & kHasCoordTransforms_Flag) {
-        fFlags |= kHasCoordTransforms_Flag;
-    }
-
     if (child->sampleMatrix().fKind == SkSL::SampleMatrix::Kind::kVariable) {
         // Since the child is sampled with a variable matrix expression, auto-generated code in
         // invokeChildWithMatrix() for this FP will refer to the local coordinates.
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index c9c419a..17cba88 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -11,10 +11,10 @@
 #include <tuple>
 
 #include "include/private/SkSLSampleMatrix.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrProcessor.h"
 #include "src/gpu/ops/GrOp.h"
 
+class GrCoordTransform;
 class GrGLSLFragmentProcessor;
 class GrPaint;
 class GrPipeline;
@@ -142,8 +142,7 @@
      * shader-lifted varyings, or by providing the base local coordinate to the fragment shader.
      */
     bool sampleCoordsDependOnLocalCoords() const {
-        return (SkToBool(fFlags & kHasCoordTransforms_Flag) ||
-                SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) ||
+        return (SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) ||
                 SkToBool(fFlags & kUsesSampleCoordsIndirectly_Flag)) &&
                !SkToBool(fFlags & kSampledWithExplicitCoords_Flag);
     }
@@ -158,9 +157,7 @@
      * specific to the FP's function and not the entire program.
      */
     bool referencesSampleCoords() const {
-        // HasCoordTransforms propagates up the FP tree, but we want the presence of an actual
-        // coord transform object (that's not one of the implicit workarounds).
-        return SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag) || fCoordTransforms.count() > 0;
+        return SkToBool(fFlags & kUsesSampleCoordsDirectly_Flag);
     }
 
     // True if this FP's parent invokes it with 'sample(float2)' or a variable 'sample(matrix)'
@@ -396,25 +393,6 @@
     }
 
     /**
-     * Fragment Processor subclasses call this from their constructor to register coordinate
-     * transformations. Coord transforms provide a mechanism for a processor to receive coordinates
-     * in their FS code. The matrix expresses a transformation from local space. For a given
-     * fragment the matrix will be applied to the local coordinate that maps to the fragment.
-     *
-     * When the transformation has perspective, the transformed coordinates will have
-     * 3 components. Otherwise they'll have 2.
-     *
-     * This must only be called from the constructor because GrProcessors are immutable. The
-     * processor subclass manages the lifetime of the transformations (this function only stores a
-     * pointer). The GrCoordTransform is typically a member field of the GrProcessor subclass.
-     *
-     * A processor subclass that has multiple methods of construction should always add its coord
-     * transforms in a consistent order. The non-virtual implementation of isEqual() automatically
-     * compares transforms and will assume they line up across the two processor instances.
-     */
-    void addCoordTransform(GrCoordTransform*);
-
-    /**
      * FragmentProcessor subclasses call this from their constructor to register any child
      * FragmentProcessors they have. This must be called AFTER all texture accesses and coord
      * transforms have been added.
@@ -510,15 +488,14 @@
         kFirstPrivateFlag = kAll_OptimizationFlags + 1,
 
         // Propagate up the FP tree to the root
-        kHasCoordTransforms_Flag = kFirstPrivateFlag,
-        kUsesSampleCoordsIndirectly_Flag = kFirstPrivateFlag << 1,
+        kUsesSampleCoordsIndirectly_Flag = kFirstPrivateFlag,
 
         // Does not propagate at all
-        kUsesSampleCoordsDirectly_Flag = kFirstPrivateFlag << 2,
+        kUsesSampleCoordsDirectly_Flag = kFirstPrivateFlag << 1,
 
         // Propagates down the FP to all its leaves
-        kSampledWithExplicitCoords_Flag = kFirstPrivateFlag << 3,
-        kNetTransformHasPerspective_Flag = kFirstPrivateFlag << 4,
+        kSampledWithExplicitCoords_Flag = kFirstPrivateFlag << 2,
+        kNetTransformHasPerspective_Flag = kFirstPrivateFlag << 3,
     };
     void addAndPushFlagToChildren(PrivateFlags flag);
 
@@ -526,8 +503,6 @@
 
     int fTextureSamplerCnt = 0;
 
-    SkSTArray<4, GrCoordTransform*, true> fCoordTransforms;
-
     SkSTArray<1, std::unique_ptr<GrFragmentProcessor>, true> fChildProcessors;
     const GrFragmentProcessor* fParent = nullptr;
     SkSL::SampleMatrix fMatrix;
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 54c330c..4385844 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -8,6 +8,7 @@
 #include "src/gpu/GrPathProcessor.h"
 
 #include "include/private/SkTo.h"
+#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrShaderCaps.h"
 #include "src/gpu/gl/GrGLGpu.h"
 #ifdef SK_GL
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index f7ecbf1..06ee04c 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -8,7 +8,6 @@
 #include "src/gpu/effects/GrCustomXfermode.h"
 
 #include "src/gpu/GrCaps.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/gpu/GrPipeline.h"
 #include "src/gpu/GrProcessor.h"
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index d6fb23f..a8ab80a 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -172,7 +172,7 @@
     this->registerExplicitlySampledChild(std::move(child));
     SkASSERT(radius <= kMaxKernelRadius);
     fill_in_1D_gaussian_kernel(fKernel, gaussianSigma, fRadius);
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(
@@ -182,7 +182,7 @@
         , fDirection(that.fDirection) {
     this->cloneAndRegisterAllChildProcessors(that);
     memcpy(fKernel, that.fKernel, radius_to_width(fRadius) * sizeof(float));
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 void GrGaussianConvolutionFragmentProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps,
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
index 61f6e4e..5eb0516 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
@@ -8,7 +8,6 @@
 #ifndef GrGaussianConvolutionFragmentProcessor_DEFINED
 #define GrGaussianConvolutionFragmentProcessor_DEFINED
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 /**
@@ -78,9 +77,6 @@
 
     static constexpr int kMaxKernelWidth = 2*kMaxKernelRadius + 1;
 
-    // We really just want the unaltered local coords, but the only way to get that right now is
-    // an identity coord transform.
-    GrCoordTransform      fCoordTransform = {};
     // The array size must be a multiple of 4 because we pass it as an array of float4 uniform
     // values.
     float                 fKernel[SkAlign4(kMaxKernelWidth)];
diff --git a/src/gpu/effects/GrMagnifierEffect.fp b/src/gpu/effects/GrMagnifierEffect.fp
index b4af4c4..5dc7cec 100644
--- a/src/gpu/effects/GrMagnifierEffect.fp
+++ b/src/gpu/effects/GrMagnifierEffect.fp
@@ -16,8 +16,6 @@
 
 uniform half2 offset;
 
-@coordTransform { SkMatrix::I() }
-
 void main() {
     float2 coord = sk_TransformedCoords2D[0];
     float2 zoom_coord = offset + coord * float2(xInvZoom, yInvZoom);
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 98b88a1..12443af 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -263,7 +263,7 @@
 void GrGLMatrixConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
                                             const GrFragmentProcessor& processor) {
     const GrMatrixConvolutionEffect& conv = processor.cast<GrMatrixConvolutionEffect>();
-    pdman.set2fv(fKernelOffsetUni, 1, conv.kernelOffset().ptr());
+    pdman.set2f(fKernelOffsetUni, conv.kernelOffset().fX, conv.kernelOffset().fY);
     float totalGain = conv.gain();
     if (conv.kernelIsSampled()) {
         totalGain *= conv.kernelSampleGain();
@@ -298,7 +298,7 @@
     }
     fKernelOffset = {static_cast<float>(kernelOffset.x()),
                      static_cast<float>(kernelOffset.y())};
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(const GrMatrixConvolutionEffect& that)
@@ -309,7 +309,7 @@
         , fKernelOffset(that.fKernelOffset)
         , fConvolveAlpha(that.fConvolveAlpha) {
     this->cloneAndRegisterAllChildProcessors(that);
-    this->addCoordTransform(&fCoordTransform);
+    this->setUsesSampleCoordsDirectly();
 }
 
 std::unique_ptr<GrFragmentProcessor> GrMatrixConvolutionEffect::clone() const {
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index e28cb95..f4d0ae1 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -46,7 +46,7 @@
 
     const SkIRect& bounds() const { return fBounds; }
     SkISize kernelSize() const { return fKernel.size(); }
-    const SkV2 kernelOffset() const { return fKernelOffset; }
+    const SkVector kernelOffset() const { return fKernelOffset; }
     bool kernelIsSampled() const { return fKernel.isSampled(); }
     const float *kernel() const { return fKernel.array().data(); }
     float kernelSampleGain() const { return fKernel.biasAndGain().fGain; }
@@ -129,14 +129,11 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    // We really just want the unaltered local coords, but the only way to get that right now is
-    // an identity coord transform.
-    GrCoordTransform fCoordTransform = {};
     SkIRect          fBounds;
     KernelWrapper    fKernel;
     float            fGain;
     float            fBias;
-    SkV2             fKernelOffset;
+    SkVector         fKernelOffset;
     bool             fConvolveAlpha;
 
     GR_DECLARE_FRAGMENT_PROCESSOR_TEST
diff --git a/src/gpu/effects/GrMatrixEffect.h b/src/gpu/effects/GrMatrixEffect.h
index d3d0451..ebc3833 100644
--- a/src/gpu/effects/GrMatrixEffect.h
+++ b/src/gpu/effects/GrMatrixEffect.h
@@ -11,7 +11,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrMatrixEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/GrSkSLFP.h b/src/gpu/effects/GrSkSLFP.h
index e3feadd..12b3f2d 100644
--- a/src/gpu/effects/GrSkSLFP.h
+++ b/src/gpu/effects/GrSkSLFP.h
@@ -11,7 +11,6 @@
 #include "include/core/SkRefCnt.h"
 #include "include/gpu/GrContextOptions.h"
 #include "src/gpu/GrCaps.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 #include "src/sksl/SkSLCompiler.h"
 #include "src/sksl/SkSLPipelineStageCodeGenerator.h"
diff --git a/src/gpu/effects/GrTextureEffect.cpp b/src/gpu/effects/GrTextureEffect.cpp
index b04e8a2..fe7792a 100644
--- a/src/gpu/effects/GrTextureEffect.cpp
+++ b/src/gpu/effects/GrTextureEffect.cpp
@@ -7,6 +7,7 @@
 
 #include "src/gpu/effects/GrTextureEffect.h"
 
+#include "src/core/SkMatrixPriv.h"
 #include "src/gpu/GrTexture.h"
 #include "src/gpu/GrTexturePriv.h"
 #include "src/gpu/effects/GrMatrixEffect.h"
diff --git a/src/gpu/effects/GrTextureEffect.h b/src/gpu/effects/GrTextureEffect.h
index d5ecd2b..511cdb6 100644
--- a/src/gpu/effects/GrTextureEffect.h
+++ b/src/gpu/effects/GrTextureEffect.h
@@ -10,7 +10,6 @@
 
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrTextureEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 56e61d6..236a9de 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -145,7 +145,7 @@
 
     if (fSnap[0] || fSnap[1]) {
         // Need this so that we can access coords in SKSL to perform snapping.
-        this->addCoordTransform(&fTransform);
+        this->setUsesSampleCoordsDirectly();
         for (int i = 0; i < numPlanes; ++i) {
             this->registerExplicitlySampledChild(std::move(planeFPs[i]));
         }
@@ -300,6 +300,9 @@
         : GrFragmentProcessor(kGrYUVtoRGBEffect_ClassID, src.optimizationFlags())
         , fYUVColorSpace(src.fYUVColorSpace) {
     this->cloneAndRegisterAllChildProcessors(src);
+    if (src.fSnap[0] || src.fSnap[1]) {
+        this->setUsesSampleCoordsDirectly();
+    }
     std::copy_n(src.fYUVAIndices, this->numChildProcessors(), fYUVAIndices);
     std::copy_n(src.fSnap, 2, fSnap);
 }
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h
index 107049d..d92dce7 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.h
+++ b/src/gpu/effects/GrYUVtoRGBEffect.h
@@ -11,7 +11,6 @@
 #include "include/core/SkTypes.h"
 
 #include "include/core/SkYUVAIndex.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrYUVtoRGBEffect : public GrFragmentProcessor {
@@ -50,7 +49,6 @@
 
     SkYUVAIndex      fYUVAIndices[4];
     SkYUVColorSpace  fYUVColorSpace;
-    GrCoordTransform fTransform = {};
     bool             fSnap[2];
 };
 #endif
diff --git a/src/gpu/effects/generated/GrAARectEffect.h b/src/gpu/effects/generated/GrAARectEffect.h
index 88891e4..332ec62 100644
--- a/src/gpu/effects/generated/GrAARectEffect.h
+++ b/src/gpu/effects/generated/GrAARectEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrAARectEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
index eeb9e9c..a09909f 100644
--- a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h b/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h
index d9c0c3b..8af063e 100644
--- a/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrBlurredEdgeFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
index 164ccdd..3b17900 100644
--- a/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h
@@ -16,7 +16,6 @@
 
 #include "src/gpu/effects/GrTextureEffect.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrCircleBlurFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrCircleEffect.h b/src/gpu/effects/generated/GrCircleEffect.h
index ded95ae..e77aa6f 100644
--- a/src/gpu/effects/generated/GrCircleEffect.h
+++ b/src/gpu/effects/generated/GrCircleEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrCircleEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrClampFragmentProcessor.h b/src/gpu/effects/generated/GrClampFragmentProcessor.h
index 795555a..b36c22a 100644
--- a/src/gpu/effects/generated/GrClampFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrClampFragmentProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrClampFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h b/src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h
index 4160af9..5a3c00f 100644
--- a/src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrColorMatrixFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrComposeLerpEffect.h b/src/gpu/effects/generated/GrComposeLerpEffect.h
index 1f9d225..f43b484 100644
--- a/src/gpu/effects/generated/GrComposeLerpEffect.h
+++ b/src/gpu/effects/generated/GrComposeLerpEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrComposeLerpEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrConfigConversionEffect.h b/src/gpu/effects/generated/GrConfigConversionEffect.h
index 129c21d..202a7f5 100644
--- a/src/gpu/effects/generated/GrConfigConversionEffect.h
+++ b/src/gpu/effects/generated/GrConfigConversionEffect.h
@@ -20,7 +20,6 @@
 #include "src/gpu/GrImageInfo.h"
 #include "src/gpu/GrRenderTargetContext.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrConfigConversionEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrConstColorProcessor.h b/src/gpu/effects/generated/GrConstColorProcessor.h
index e9b8b86..2394bf0 100644
--- a/src/gpu/effects/generated/GrConstColorProcessor.h
+++ b/src/gpu/effects/generated/GrConstColorProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrConstColorProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrDeviceSpaceEffect.h b/src/gpu/effects/generated/GrDeviceSpaceEffect.h
index 72daab1..dd4d4f7 100644
--- a/src/gpu/effects/generated/GrDeviceSpaceEffect.h
+++ b/src/gpu/effects/generated/GrDeviceSpaceEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrDeviceSpaceEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrEllipseEffect.h b/src/gpu/effects/generated/GrEllipseEffect.h
index 6348d97..28df4ee 100644
--- a/src/gpu/effects/generated/GrEllipseEffect.h
+++ b/src/gpu/effects/generated/GrEllipseEffect.h
@@ -16,7 +16,6 @@
 
 #include "src/gpu/GrShaderCaps.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrEllipseEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrHSLToRGBFilterEffect.h b/src/gpu/effects/generated/GrHSLToRGBFilterEffect.h
index 25f10b8..912ed1b 100644
--- a/src/gpu/effects/generated/GrHSLToRGBFilterEffect.h
+++ b/src/gpu/effects/generated/GrHSLToRGBFilterEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrHSLToRGBFilterEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrLumaColorFilterEffect.h b/src/gpu/effects/generated/GrLumaColorFilterEffect.h
index 274958e..624587b 100644
--- a/src/gpu/effects/generated/GrLumaColorFilterEffect.h
+++ b/src/gpu/effects/generated/GrLumaColorFilterEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrLumaColorFilterEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrMagnifierEffect.cpp b/src/gpu/effects/generated/GrMagnifierEffect.cpp
index 24e3107..b447b1a 100644
--- a/src/gpu/effects/generated/GrMagnifierEffect.cpp
+++ b/src/gpu/effects/generated/GrMagnifierEffect.cpp
@@ -70,14 +70,14 @@
                 args.fUniformHandler->getUniformCStr(boundsUniformVar),
                 args.fUniformHandler->getUniformCStr(xInvInsetVar),
                 args.fUniformHandler->getUniformCStr(yInvInsetVar));
-        SkString _coords1112("mix(coord, zoom_coord, weight)");
-        SkString _sample1112;
-        _sample1112 = this->invokeChild(_outer.src_index, args, _coords1112.c_str());
+        SkString _coords1077("mix(coord, zoom_coord, weight)");
+        SkString _sample1077;
+        _sample1077 = this->invokeChild(_outer.src_index, args, _coords1077.c_str());
         fragBuilder->codeAppendf(
                 R"SkSL(
 %s = %s;
 )SkSL",
-                args.fOutputColor, _sample1112.c_str());
+                args.fOutputColor, _sample1077.c_str());
     }
 
 private:
@@ -136,7 +136,6 @@
 }
 GrMagnifierEffect::GrMagnifierEffect(const GrMagnifierEffect& src)
         : INHERITED(kGrMagnifierEffect_ClassID, src.optimizationFlags())
-        , fCoordTransform0(src.fCoordTransform0)
         , bounds(src.bounds)
         , srcRect(src.srcRect)
         , xInvZoom(src.xInvZoom)
@@ -144,7 +143,6 @@
         , xInvInset(src.xInvInset)
         , yInvInset(src.yInvInset) {
     { src_index = this->cloneAndRegisterChildProcessor(src.childProcessor(src.src_index)); }
-    this->addCoordTransform(&fCoordTransform0);
     this->setUsesSampleCoordsDirectly();
 }
 std::unique_ptr<GrFragmentProcessor> GrMagnifierEffect::clone() const {
diff --git a/src/gpu/effects/generated/GrMagnifierEffect.h b/src/gpu/effects/generated/GrMagnifierEffect.h
index 3723be4..8cee43e 100644
--- a/src/gpu/effects/generated/GrMagnifierEffect.h
+++ b/src/gpu/effects/generated/GrMagnifierEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrMagnifierEffect : public GrFragmentProcessor {
@@ -32,7 +31,6 @@
     GrMagnifierEffect(const GrMagnifierEffect& src);
     std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "MagnifierEffect"; }
-    GrCoordTransform fCoordTransform0;
     int src_index = -1;
     SkIRect bounds;
     SkRect srcRect;
@@ -50,7 +48,6 @@
                       float xInvInset,
                       float yInvInset)
             : INHERITED(kGrMagnifierEffect_ClassID, kNone_OptimizationFlags)
-            , fCoordTransform0(SkMatrix::I())
             , bounds(bounds)
             , srcRect(srcRect)
             , xInvZoom(xInvZoom)
@@ -60,7 +57,6 @@
         this->setUsesSampleCoordsDirectly();
         SkASSERT(src);
         src_index = this->registerExplicitlySampledChild(std::move(src));
-        this->addCoordTransform(&fCoordTransform0);
     }
     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/generated/GrMixerEffect.h b/src/gpu/effects/generated/GrMixerEffect.h
index 391fbf6..e44ab56 100644
--- a/src/gpu/effects/generated/GrMixerEffect.h
+++ b/src/gpu/effects/generated/GrMixerEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrMixerEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h b/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h
index 988b1ca..620bded 100644
--- a/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrOverrideInputFragmentProcessor : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrRGBToHSLFilterEffect.h b/src/gpu/effects/generated/GrRGBToHSLFilterEffect.h
index 4b5fdcc..fdcfbb7 100644
--- a/src/gpu/effects/generated/GrRGBToHSLFilterEffect.h
+++ b/src/gpu/effects/generated/GrRGBToHSLFilterEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrRGBToHSLFilterEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.h b/src/gpu/effects/generated/GrRRectBlurEffect.h
index 32efd14..6b52daa 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.h
@@ -27,7 +27,6 @@
 #include "src/gpu/GrStyle.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrRRectBlurEffect : public GrFragmentProcessor {
diff --git a/src/gpu/effects/generated/GrRectBlurEffect.h b/src/gpu/effects/generated/GrRectBlurEffect.h
index 9b45f1e..6506a09 100644
--- a/src/gpu/effects/generated/GrRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRectBlurEffect.h
@@ -27,7 +27,6 @@
 #include "src/gpu/GrShaderCaps.h"
 #include "src/gpu/effects/GrTextureEffect.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrRectBlurEffect : public GrFragmentProcessor {
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index a787b8d..8beb34b 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -7,6 +7,7 @@
 
 #include "include/core/SkStream.h"
 #include "include/core/SkTypeface.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/gpu/GrProgramInfo.h"
 #include "src/gpu/GrRenderTargetProxy.h"
 #include "src/gpu/gl/GrGLGpu.h"
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 17938d4..7491b39 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -5,7 +5,6 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrPathProcessor.h"
 #include "src/gpu/GrPipeline.h"
 #include "src/gpu/GrProcessor.h"
diff --git a/src/gpu/gradients/generated/GrClampedGradientEffect.h b/src/gpu/gradients/generated/GrClampedGradientEffect.h
index eee25ff..8d2c0bc 100644
--- a/src/gpu/gradients/generated/GrClampedGradientEffect.h
+++ b/src/gpu/gradients/generated/GrClampedGradientEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrClampedGradientEffect : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrDualIntervalGradientColorizer.h b/src/gpu/gradients/generated/GrDualIntervalGradientColorizer.h
index 58a97a3..a869661 100644
--- a/src/gpu/gradients/generated/GrDualIntervalGradientColorizer.h
+++ b/src/gpu/gradients/generated/GrDualIntervalGradientColorizer.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrDualIntervalGradientColorizer : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrLinearGradientLayout.h b/src/gpu/gradients/generated/GrLinearGradientLayout.h
index 47c3980..21d68eb 100644
--- a/src/gpu/gradients/generated/GrLinearGradientLayout.h
+++ b/src/gpu/gradients/generated/GrLinearGradientLayout.h
@@ -18,7 +18,6 @@
 #include "src/gpu/gradients/GrGradientShader.h"
 #include "src/shaders/gradients/SkLinearGradient.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrLinearGradientLayout : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrRadialGradientLayout.h b/src/gpu/gradients/generated/GrRadialGradientLayout.h
index efca6ab..0584879 100644
--- a/src/gpu/gradients/generated/GrRadialGradientLayout.h
+++ b/src/gpu/gradients/generated/GrRadialGradientLayout.h
@@ -18,7 +18,6 @@
 #include "src/gpu/gradients/GrGradientShader.h"
 #include "src/shaders/gradients/SkRadialGradient.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrRadialGradientLayout : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h b/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h
index a8cd30f..0f01b7e 100644
--- a/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h
+++ b/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrSingleIntervalGradientColorizer : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrSweepGradientLayout.h b/src/gpu/gradients/generated/GrSweepGradientLayout.h
index e5f336f..1e4179d 100644
--- a/src/gpu/gradients/generated/GrSweepGradientLayout.h
+++ b/src/gpu/gradients/generated/GrSweepGradientLayout.h
@@ -18,7 +18,6 @@
 #include "src/gpu/gradients/GrGradientShader.h"
 #include "src/shaders/gradients/SkSweepGradient.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrSweepGradientLayout : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrTextureGradientColorizer.h b/src/gpu/gradients/generated/GrTextureGradientColorizer.h
index b49637a..b125b65 100644
--- a/src/gpu/gradients/generated/GrTextureGradientColorizer.h
+++ b/src/gpu/gradients/generated/GrTextureGradientColorizer.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrTextureGradientColorizer : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrTiledGradientEffect.h b/src/gpu/gradients/generated/GrTiledGradientEffect.h
index 4fbf2d3..5c004bb 100644
--- a/src/gpu/gradients/generated/GrTiledGradientEffect.h
+++ b/src/gpu/gradients/generated/GrTiledGradientEffect.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrTiledGradientEffect : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h b/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h
index 1651f34..25defb9 100644
--- a/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h
+++ b/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h
@@ -18,7 +18,6 @@
 #include "src/gpu/gradients/GrGradientShader.h"
 #include "src/shaders/gradients/SkTwoPointConicalGradient.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrTwoPointConicalGradientLayout : public GrFragmentProcessor {
diff --git a/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h b/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h
index 144cd8c..5d9e6f3 100644
--- a/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h
+++ b/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h
@@ -14,7 +14,6 @@
 #include "include/core/SkM44.h"
 #include "include/core/SkTypes.h"
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrUnrolledBinaryGradientColorizer : public GrFragmentProcessor {
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 2dc3e1a..316eb54 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -8,6 +8,7 @@
 #include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
 #include "src/core/SkGeometry.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkPathPriv.h"
 #include "src/core/SkPointPriv.h"
 #include "src/gpu/GrAuditTrail.h"
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index 5ee04a4..926baaf 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -10,7 +10,6 @@
 #include "src/core/SkPointPriv.h"
 #include "src/gpu/GrAppliedClip.h"
 #include "src/gpu/GrCaps.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrDefaultGeoProcFactory.h"
 #include "src/gpu/GrDrawOpTest.h"
 #include "src/gpu/GrGeometryProcessor.h"
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index 88175db..17ddfa8 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -10,6 +10,7 @@
 #include "include/core/SkString.h"
 #include "include/core/SkStrokeRec.h"
 #include "src/core/SkGeometry.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkTLazy.h"
 #include "src/core/SkTraceEvent.h"
 #include "src/gpu/GrAuditTrail.h"
diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp
index 186ced5..7492fe1 100644
--- a/src/gpu/ops/GrDrawAtlasOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasOp.cpp
@@ -10,6 +10,7 @@
 #include "include/core/SkRSXform.h"
 #include "include/private/GrRecordingContext.h"
 #include "include/utils/SkRandom.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkRectPriv.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrDefaultGeoProcFactory.h"
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index 111cc7e..7e4ca59 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -9,6 +9,7 @@
 #include "include/effects/SkRuntimeEffect.h"
 #include "src/core/SkArenaAlloc.h"
 #include "src/core/SkDevice.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkVerticesPriv.h"
 #include "src/gpu/GrOpFlushState.h"
 #include "src/gpu/GrProgramInfo.h"
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index f720f63..19495ae 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -6,6 +6,7 @@
  */
 
 #include "include/core/SkStrokeRec.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkRRectPriv.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrDrawOpTest.h"
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 0f3ab8a..9df6ce5 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -13,6 +13,7 @@
 #include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkDistanceFieldGen.h"
 #include "src/core/SkDraw.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkMatrixProvider.h"
 #include "src/core/SkPointPriv.h"
 #include "src/core/SkRasterClip.h"
diff --git a/src/gpu/ops/GrStrokeRectOp.cpp b/src/gpu/ops/GrStrokeRectOp.cpp
index e3f1440..7bbfc0f 100644
--- a/src/gpu/ops/GrStrokeRectOp.cpp
+++ b/src/gpu/ops/GrStrokeRectOp.cpp
@@ -10,6 +10,7 @@
 #include "include/core/SkStrokeRec.h"
 #include "include/private/GrResourceKey.h"
 #include "include/utils/SkRandom.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/gpu/GrCaps.h"
 #include "src/gpu/GrColor.h"
 #include "src/gpu/GrDefaultGeoProcFactory.h"
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 565d605..875d939 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -9,6 +9,7 @@
 #include "include/gpu/GrContext.h"
 #include "include/private/SkTemplates.h"
 #include "src/core/SkMaskFilterBase.h"
+#include "src/core/SkMatrixPriv.h"
 #include "src/core/SkMatrixProvider.h"
 #include "src/core/SkPaintPriv.h"
 #include "src/core/SkStrikeSpec.h"
diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp
index d2a7380..a38c417 100644
--- a/src/shaders/SkPerlinNoiseShader.cpp
+++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -18,7 +18,6 @@
 
 #if SK_SUPPORT_GPU
 #include "include/private/GrRecordingContext.h"
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrRecordingContextPriv.h"
 #include "src/gpu/SkGr.h"
 #include "src/gpu/effects/GrMatrixEffect.h"
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp
index 3bb7d6d..96c01e3 100644
--- a/src/sksl/SkSLHCodeGenerator.cpp
+++ b/src/sksl/SkSLHCodeGenerator.cpp
@@ -402,7 +402,6 @@
                  "\n");
     this->writeSection(HEADER_SECTION);
     this->writef("\n"
-                 "#include \"src/gpu/GrCoordTransform.h\"\n"
                  "#include \"src/gpu/GrFragmentProcessor.h\"\n"
                  "\n");
     this->writef("class %s : public GrFragmentProcessor {\n"
diff --git a/tests/SkSLFPTest.cpp b/tests/SkSLFPTest.cpp
index bcace4b..692298d 100644
--- a/tests/SkSLFPTest.cpp
+++ b/tests/SkSLFPTest.cpp
@@ -105,7 +105,6 @@
 #include "include/core/SkTypes.h"
 
 
-#include "src/gpu/GrCoordTransform.h"
 #include "src/gpu/GrFragmentProcessor.h"
 
 class GrTest : public GrFragmentProcessor {