Remove option to make GrCoordTransforms apply to device positions.

Adds a device space texture decal effect to use for clipping.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2870

Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5
Reviewed-on: https://skia-review.googlesource.com/2870
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index d85db11..7694a3f 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -79,26 +79,12 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// set up the draw state to enable the aa clipping mask. Besides setting up the
-// stage matrix this also alters the vertex layout
+// set up the draw state to enable the aa clipping mask.
 static sk_sp<GrFragmentProcessor> create_fp_for_mask(GrTexture* result,
                                                      const SkIRect &devBound) {
-    SkMatrix mat;
-    // We use device coords to compute the texture coordinates. We set our matrix to be a
-    // translation to the devBound, and then a scaling matrix to normalized coords.
-    mat.setIDiv(result->width(), result->height());
-    mat.preTranslate(SkIntToScalar(-devBound.fLeft),
-                     SkIntToScalar(-devBound.fTop));
-
     SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height());
-    return sk_sp<GrFragmentProcessor>(GrTextureDomainEffect::Make(
-                                         result,
-                                         nullptr,
-                                         mat,
-                                         GrTextureDomain::MakeTexelDomain(result, domainTexels),
-                                         GrTextureDomain::kDecal_Mode,
-                                         GrTextureParams::kNone_FilterMode,
-                                         kDevice_GrCoordSet));
+    return GrDeviceSpaceTextureDecalFragmentProcessor::Make(result, domainTexels,
+                                                            {devBound.fLeft, devBound.fTop});
 }
 
 // Does the path in 'element' require SW rendering? If so, return true (and,