Revert "Revert "move onto new factories for SkMatrix""

This reverts commit c80ee456adf664c4a62fa2ccaeaf157c723ed656.

fix: update flutter's gn file to add guard

Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/android/SkAnimatedImage.cpp b/src/android/SkAnimatedImage.cpp
index 3ae8a84..966f150 100644
--- a/src/android/SkAnimatedImage.cpp
+++ b/src/android/SkAnimatedImage.cpp
@@ -92,10 +92,10 @@
     }
 
     if (!fSimple) {
-        fMatrix = SkMatrix::MakeTrans(-fCropRect.fLeft, -fCropRect.fTop);
+        fMatrix = SkMatrix::Translate(-fCropRect.fLeft, -fCropRect.fTop);
         float scaleX = (float) fScaledSize.width()  / fDecodeInfo.width();
         float scaleY = (float) fScaledSize.height() / fDecodeInfo.height();
-        fMatrix.preConcat(SkMatrix::MakeScale(scaleX, scaleY));
+        fMatrix.preConcat(SkMatrix::Scale(scaleX, scaleY));
     }
     this->decodeNextFrame();
 }
diff --git a/src/codec/SkWuffsCodec.cpp b/src/codec/SkWuffsCodec.cpp
index 88394b3..4da7162 100644
--- a/src/codec/SkWuffsCodec.cpp
+++ b/src/codec/SkWuffsCodec.cpp
@@ -755,7 +755,7 @@
         SkRasterClip rc(SkIRect::MakeSize(this->dstInfo().dimensions()));
         draw.fRC = &rc;
 
-        SkMatrix translate = SkMatrix::MakeTrans(dirty_rect.min_incl_x, dirty_rect.min_incl_y);
+        SkMatrix translate = SkMatrix::Translate(dirty_rect.min_incl_x, dirty_rect.min_incl_y);
         draw.drawBitmap(src, translate, nullptr, paint);
     }
 
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index 069f0a1..aeb56aa 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -574,7 +574,7 @@
         draw.fRC = &fRCStack.rc();
         paint.writable()->setShader(src->fBitmap.makeShader());
         draw.drawBitmap(*src->fCoverage.get(),
-                        SkMatrix::MakeTrans(SkIntToScalar(x),SkIntToScalar(y)), nullptr, *paint);
+                        SkMatrix::Translate(SkIntToScalar(x),SkIntToScalar(y)), nullptr, *paint);
     } else {
         BDDraw(this).drawSprite(src->fBitmap, x, y, *paint);
     }
@@ -628,7 +628,7 @@
     if (SkImageFilter* filter = paint->getImageFilter()) {
         SkIPoint offset = SkIPoint::Make(0, 0);
         const SkMatrix matrix = SkMatrix::Concat(
-            SkMatrix::MakeTrans(SkIntToScalar(-x), SkIntToScalar(-y)), this->localToDevice());
+            SkMatrix::Translate(SkIntToScalar(-x), SkIntToScalar(-y)), this->localToDevice());
         const SkIRect clipBounds = fRCStack.rc().getBounds().makeOffset(-x, -y);
         sk_sp<SkImageFilterCache> cache(this->getImageFilterCache());
         SkImageFilter_Base::Context ctx(matrix, clipBounds, cache.get(), fBitmap.colorType(),
@@ -679,7 +679,7 @@
         // (while compensating in the shader matrix).
         mask = sk_ref_sp(clipImage);
         maskMatrix = totalMatrix;
-        shaderMatrix = SkMatrix::Concat(totalInverse, SkMatrix::MakeTrans(x, y));
+        shaderMatrix = totalInverse * SkMatrix::Translate(x, y);
 
         // If the mask is not fully contained within the src layer, we must clip.
         if (!srcBounds.contains(clipBounds)) {
@@ -698,7 +698,7 @@
 
         mask = surf->makeImageSnapshot();
         maskMatrix = SkMatrix::I();
-        shaderMatrix = SkMatrix::MakeTrans(x - maskBounds.x(), y - maskBounds.y());
+        shaderMatrix = SkMatrix::Translate(x - maskBounds.x(), y - maskBounds.y());
     }
 
     SkAutoDeviceTransformRestore adr(this, maskMatrix);
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index bf2ee61..af6b269 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -931,7 +931,7 @@
         toRoot = SkMatrix::I();
         layerMatrix = ctm;
     } else if (ctm.decomposeScale(&scale, &toRoot)) {
-        layerMatrix = SkMatrix::MakeScale(scale.fWidth, scale.fHeight);
+        layerMatrix = SkMatrix::Scale(scale.fWidth, scale.fHeight);
     } else {
         // Perspective, for now, do no scaling of the layer itself.
         // TODO (michaelludwig) - perhaps it'd be better to explore a heuristic scale pulled from
@@ -2681,7 +2681,7 @@
 #endif
     RETURN_ON_NULL(dr);
     if (x || y) {
-        SkMatrix matrix = SkMatrix::MakeTrans(x, y);
+        SkMatrix matrix = SkMatrix::Translate(x, y);
         this->onDrawDrawable(dr, &matrix);
     } else {
         this->onDrawDrawable(dr, nullptr);
diff --git a/src/core/SkClipStackDevice.cpp b/src/core/SkClipStackDevice.cpp
index ab2fcd8..bbcec4f 100644
--- a/src/core/SkClipStackDevice.cpp
+++ b/src/core/SkClipStackDevice.cpp
@@ -44,7 +44,7 @@
     SkRegion tmp;
     SkPath path;
     rgn.getBoundaryPath(&path);
-    path.transform(SkMatrix::MakeTrans(-origin));
+    path.transform(SkMatrix::Translate(-origin));
     fClipStack.clipPath(path, SkMatrix::I(), op, false);
 }
 
diff --git a/src/core/SkDrawable.cpp b/src/core/SkDrawable.cpp
index 62b0272..5e12fa5 100644
--- a/src/core/SkDrawable.cpp
+++ b/src/core/SkDrawable.cpp
@@ -43,7 +43,7 @@
 }
 
 void SkDrawable::draw(SkCanvas* canvas, SkScalar x, SkScalar y) {
-    SkMatrix matrix = SkMatrix::MakeTrans(x, y);
+    SkMatrix matrix = SkMatrix::Translate(x, y);
     this->draw(canvas, &matrix);
 }
 
diff --git a/src/core/SkFont.cpp b/src/core/SkFont.cpp
index 9a47675..6e066dd 100644
--- a/src/core/SkFont.cpp
+++ b/src/core/SkFont.cpp
@@ -270,7 +270,7 @@
     SkScalar scale = strikeSpec.strikeToSourceRatio();
 
     if (bounds) {
-        SkMatrix scaleMat = SkMatrix::MakeScale(scale);
+        SkMatrix scaleMat = SkMatrix::Scale(scale, scale);
         SkRect* cursor = bounds;
         for (auto glyph : glyphs) {
             scaleMat.mapRectScaleTranslate(cursor++, glyph->rect());
@@ -316,7 +316,7 @@
                       void (*proc)(const SkPath*, const SkMatrix&, void*), void* ctx) const {
     SkFont font(*this);
     SkScalar scale = font.setupForAsPaths(nullptr);
-    const SkMatrix mx = SkMatrix::MakeScale(scale);
+    const SkMatrix mx = SkMatrix::Scale(scale, scale);
 
     SkStrikeSpec strikeSpec = SkStrikeSpec::MakeWithNoDevice(font);
     SkBulkGlyphMetricsAndPaths paths{strikeSpec};
diff --git a/src/core/SkFontPriv.h b/src/core/SkFontPriv.h
index 6b7bd86..5d07909 100644
--- a/src/core/SkFontPriv.h
+++ b/src/core/SkFontPriv.h
@@ -37,7 +37,7 @@
      *  Return a matrix that applies the paint's text values: size, scale, skew
      */
     static SkMatrix MakeTextMatrix(SkScalar size, SkScalar scaleX, SkScalar skewX) {
-        SkMatrix m = SkMatrix::MakeScale(size * scaleX, size);
+        SkMatrix m = SkMatrix::Scale(size * scaleX, size);
         if (skewX) {
             m.postSkew(skewX, 0);
         }
diff --git a/src/core/SkImageFilterTypes.cpp b/src/core/SkImageFilterTypes.cpp
index f2f6667..ab96723 100644
--- a/src/core/SkImageFilterTypes.cpp
+++ b/src/core/SkImageFilterTypes.cpp
@@ -37,7 +37,7 @@
         // TODO (michaelludwig) - Should maybe strip out any fractional part of the translation in
         // 'ctm' so that can be incorporated during regular drawing, instead of by resampling the
         // filtered image.
-        layer = SkMatrix::MakeScale(scale.fWidth, scale.fHeight);
+        layer = SkMatrix::Scale(scale.fWidth, scale.fHeight);
     } else {
         // Perspective
         // TODO (michaelludwig) - Should investigate choosing a scale factor for the layer matrix
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index a9e053e..725db7e 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -241,11 +241,11 @@
 }
 
 void SkPictureRecord::didScale(SkScalar x, SkScalar y) {
-    this->didConcat(SkMatrix::MakeScale(x, y));
+    this->didConcat(SkMatrix::Scale(x, y));
 }
 
 void SkPictureRecord::didTranslate(SkScalar x, SkScalar y) {
-    this->didConcat(SkMatrix::MakeTrans(x, y));
+    this->didConcat(SkMatrix::Translate(x, y));
 }
 
 void SkPictureRecord::didConcat(const SkMatrix& matrix) {
diff --git a/src/effects/SkOpPathEffect.cpp b/src/effects/SkOpPathEffect.cpp
index 3a2d820..d63e2f0 100644
--- a/src/effects/SkOpPathEffect.cpp
+++ b/src/effects/SkOpPathEffect.cpp
@@ -57,7 +57,7 @@
     if (!SkScalarsAreFinite(dx, dy)) {
         return nullptr;
     }
-    return sk_sp<SkPathEffect>(new SkMatrixPE(SkMatrix::MakeTrans(dx, dy)));
+    return sk_sp<SkPathEffect>(new SkMatrixPE(SkMatrix::Translate(dx, dy)));
 }
 
 sk_sp<SkPathEffect> SkMatrixPathEffect::Make(const SkMatrix& matrix) {
diff --git a/src/effects/imagefilters/SkAlphaThresholdFilter.cpp b/src/effects/imagefilters/SkAlphaThresholdFilter.cpp
index 9984491..2080c5c 100644
--- a/src/effects/imagefilters/SkAlphaThresholdFilter.cpp
+++ b/src/effects/imagefilters/SkAlphaThresholdFilter.cpp
@@ -168,7 +168,7 @@
 
         auto textureFP = GrTextureEffect::Make(
                 std::move(inputView), input->alphaType(),
-                SkMatrix::MakeTrans(input->subset().x(), input->subset().y()));
+                SkMatrix::Translate(input->subset().x(), input->subset().y()));
         textureFP = GrColorSpaceXformEffect::Make(std::move(textureFP), input->getColorSpace(),
                                                   input->alphaType(), ctx.colorSpace());
         if (!textureFP) {
diff --git a/src/effects/imagefilters/SkArithmeticImageFilter.cpp b/src/effects/imagefilters/SkArithmeticImageFilter.cpp
index b357cb8..df7465f 100644
--- a/src/effects/imagefilters/SkArithmeticImageFilter.cpp
+++ b/src/effects/imagefilters/SkArithmeticImageFilter.cpp
@@ -354,7 +354,7 @@
 
     if (background) {
         SkRect bgSubset = SkRect::Make(background->subset());
-        SkMatrix backgroundMatrix = SkMatrix::MakeTrans(
+        SkMatrix backgroundMatrix = SkMatrix::Translate(
                 SkIntToScalar(bgSubset.left() - backgroundOffset.fX),
                 SkIntToScalar(bgSubset.top()  - backgroundOffset.fY));
         bgFP = GrTextureEffect::MakeSubset(std::move(backgroundView), background->alphaType(),
@@ -369,7 +369,7 @@
 
     if (foreground) {
         SkRect fgSubset = SkRect::Make(foreground->subset());
-        SkMatrix foregroundMatrix = SkMatrix::MakeTrans(
+        SkMatrix foregroundMatrix = SkMatrix::Translate(
                 SkIntToScalar(fgSubset.left() - foregroundOffset.fX),
                 SkIntToScalar(fgSubset.top()  - foregroundOffset.fY));
         auto fgFP = GrTextureEffect::MakeSubset(std::move(foregroundView), foreground->alphaType(),
diff --git a/src/effects/imagefilters/SkDisplacementMapEffect.cpp b/src/effects/imagefilters/SkDisplacementMapEffect.cpp
index aa926f8..14e541d 100644
--- a/src/effects/imagefilters/SkDisplacementMapEffect.cpp
+++ b/src/effects/imagefilters/SkDisplacementMapEffect.cpp
@@ -338,7 +338,7 @@
         }
         const auto isProtected = colorView.proxy()->isProtected();
 
-        SkMatrix offsetMatrix = SkMatrix::MakeTrans(SkIntToScalar(colorOffset.fX - displOffset.fX),
+        SkMatrix offsetMatrix = SkMatrix::Translate(SkIntToScalar(colorOffset.fX - displOffset.fX),
                                                     SkIntToScalar(colorOffset.fY - displOffset.fY));
 
         std::unique_ptr<GrFragmentProcessor> fp =
@@ -472,12 +472,12 @@
                                                   GrSamplerState::Filter::kNearest);
     auto colorEffect = GrTextureEffect::MakeSubset(std::move(color),
                                                    kPremul_SkAlphaType,
-                                                   SkMatrix::MakeTrans(colorSubset.topLeft()),
+                                                   SkMatrix::Translate(colorSubset.topLeft()),
                                                    kColorSampler,
                                                    SkRect::Make(colorSubset),
                                                    caps);
 
-    auto dispM = SkMatrix::Concat(SkMatrix::MakeTrans(displSubset.topLeft()), offsetMatrix);
+    auto dispM = SkMatrix::Concat(SkMatrix::Translate(displSubset.topLeft()), offsetMatrix);
     auto dispEffect = GrTextureEffect::Make(std::move(displacement),
                                             kPremul_SkAlphaType,
                                             dispM,
diff --git a/src/effects/imagefilters/SkXfermodeImageFilter.cpp b/src/effects/imagefilters/SkXfermodeImageFilter.cpp
index 84a2764..ff9af1c 100644
--- a/src/effects/imagefilters/SkXfermodeImageFilter.cpp
+++ b/src/effects/imagefilters/SkXfermodeImageFilter.cpp
@@ -264,7 +264,7 @@
 
     if (backgroundView.asTextureProxy()) {
         SkRect bgSubset = SkRect::Make(background->subset());
-        SkMatrix bgMatrix = SkMatrix::MakeTrans(
+        SkMatrix bgMatrix = SkMatrix::Translate(
                 SkIntToScalar(bgSubset.left() - backgroundOffset.fX),
                 SkIntToScalar(bgSubset.top()  - backgroundOffset.fY));
         bgFP = GrTextureEffect::MakeSubset(std::move(backgroundView), background->alphaType(),
@@ -279,7 +279,7 @@
 
     if (foregroundView.asTextureProxy()) {
         SkRect fgSubset = SkRect::Make(foreground->subset());
-        SkMatrix fgMatrix = SkMatrix::MakeTrans(
+        SkMatrix fgMatrix = SkMatrix::Translate(
                 SkIntToScalar(fgSubset.left() - foregroundOffset.fX),
                 SkIntToScalar(fgSubset.top()  - foregroundOffset.fY));
         auto fgFP = GrTextureEffect::MakeSubset(std::move(foregroundView), foreground->alphaType(),
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 66c145d..ebbfe91 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -53,7 +53,7 @@
         return false;
     }
 
-    SkMatrix matrix = SkMatrix::MakeTrans(-SkIntToScalar(maskRect.fLeft),
+    SkMatrix matrix = SkMatrix::Translate(-SkIntToScalar(maskRect.fLeft),
                                           -SkIntToScalar(maskRect.fTop));
     matrix.preConcat(viewMatrix);
     paint.addCoverageFragmentProcessor(
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 37121fd..f0f31a6 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -79,7 +79,7 @@
                                                                const GrCaps& caps) {
     GrSamplerState samplerState(GrSamplerState::WrapMode::kClampToBorder,
                                 GrSamplerState::Filter::kNearest);
-    auto m = SkMatrix::MakeTrans(-devBound.fLeft, -devBound.fTop);
+    auto m = SkMatrix::Translate(-devBound.fLeft, -devBound.fTop);
     auto subset = SkRect::Make(devBound.size());
     // We scissor to devBounds. The mask's texel centers are aligned to device space
     // pixel centers. Hence this domain of texture coordinates.
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 5c3dc0f..0990e76 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -2011,7 +2011,7 @@
 
     // TODO: Use one transfer buffer for all three planes to reduce map/unmap cost?
 
-    auto texMatrix = SkMatrix::MakeTrans(x, y);
+    auto texMatrix = SkMatrix::Translate(x, y);
 
     SkRect dstRectY = SkRect::Make(dstSize);
     SkRect dstRectUV = SkRect::MakeWH(halfW, halfH);
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 6646cae..ec0ce46 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -161,7 +161,7 @@
     // We use device coords to compute the texture coordinates. We take the device coords and apply
     // a translation so that the top-left of the device bounds maps to 0,0, and then a scaling
     // matrix to normalized coords.
-    SkMatrix maskMatrix = SkMatrix::MakeTrans(SkIntToScalar(-textureOriginInDeviceSpace.fX),
+    SkMatrix maskMatrix = SkMatrix::Translate(SkIntToScalar(-textureOriginInDeviceSpace.fX),
                                               SkIntToScalar(-textureOriginInDeviceSpace.fY));
     maskMatrix.preConcat(viewMatrix);
 
diff --git a/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
index 4eb3a4e..4373512 100644
--- a/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
+++ b/src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp
@@ -28,7 +28,7 @@
 }
 
 @coordTransform(mask) {
-    SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y()))
+    SkMatrix::Translate(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y()))
 }
 
 @cpp {
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 114f54b..6e70b20 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -74,7 +74,7 @@
                 dimensions.height() == yDimensions.height() / 2 + 1) {
                 sy = 0.5f;
             }
-            *planeMatrix.writable() = SkMatrix::MakeScale(sx, sy);
+            *planeMatrix.writable() = SkMatrix::Scale(sx, sy);
             planeMatrix.writable()->preConcat(localMatrix);
             planeFilter = subsampledPlaneFilterMode;
             if (subset) {
diff --git a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
index c4de913..68e9465 100644
--- a/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
+++ b/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h
@@ -41,7 +41,7 @@
                                       const SkIRect& bounds)
             : INHERITED(kGrAlphaThresholdFragmentProcessor_ClassID, kNone_OptimizationFlags)
             , maskCoordTransform(
-                      SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y())),
+                      SkMatrix::Translate(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y())),
                       mask.proxy(),
                       mask.origin())
             , mask(std::move(mask))
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 737bea3..d708561 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -520,8 +520,8 @@
 
             // Calculate the matrix that maps the path glyphs from their size in the strike to
             // the graphics source space.
-            SkMatrix strikeToSource = SkMatrix::MakeScale(
-                    subRun->fStrikeSpec.strikeToSourceRatio());
+            SkScalar scale = subRun->fStrikeSpec.strikeToSourceRatio();
+            SkMatrix strikeToSource = SkMatrix::Scale(scale, scale);
             strikeToSource.postTranslate(drawOrigin.x(), drawOrigin.y());
             if (!needsExactCTM) {
                 for (const auto& pathPos : subRun->fPaths) {
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 9aba1e3..fff0c33 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -284,7 +284,7 @@
     // subset's top left corner. But the clip bounds and any crop rects on the filters are in the
     // original coordinate system, so configure the CTM to correct crop rects and explicitly adjust
     // the clip bounds (since it is assumed to already be in image space).
-    SkImageFilter_Base::Context context(SkMatrix::MakeTrans(-subset.x(), -subset.y()),
+    SkImageFilter_Base::Context context(SkMatrix::Translate(-subset.x(), -subset.y()),
                                         clipBounds.makeOffset(-subset.topLeft()),
                                         cache.get(), fInfo.colorType(), fInfo.colorSpace(),
                                         srcSpecialImage.get());
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 8017ab5..67bb2d4 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -740,7 +740,7 @@
 static SkRect get_glyph_bounds_device_space(const SkGlyph* glyph,
                                             SkScalar xScale, SkScalar yScale,
                                             SkPoint xy, const SkMatrix& ctm) {
-    SkRect glyphBounds = SkMatrix::MakeScale(xScale, yScale).mapRect(glyph->rect());
+    SkRect glyphBounds = SkMatrix::Scale(xScale, yScale).mapRect(glyph->rect());
     glyphBounds.offset(xy);
     ctm.mapRect(&glyphBounds); // now in dev space.
     return glyphBounds;
@@ -1000,7 +1000,7 @@
         return;
     }
 
-    SkMatrix matrix = SkMatrix::MakeTrans(SkIntToScalar(x), SkIntToScalar(y));
+    SkMatrix matrix = SkMatrix::Translate(SkIntToScalar(x), SkIntToScalar(y));
     ScopedContentEntry content(this, &this->cs(), matrix, paint);
     if (!content) {
         return;
diff --git a/src/shaders/gradients/SkSweepGradient.cpp b/src/shaders/gradients/SkSweepGradient.cpp
index b8a8c51..1cd7a05 100644
--- a/src/shaders/gradients/SkSweepGradient.cpp
+++ b/src/shaders/gradients/SkSweepGradient.cpp
@@ -13,7 +13,7 @@
 
 SkSweepGradient::SkSweepGradient(const SkPoint& center, SkScalar t0, SkScalar t1,
                                  const Descriptor& desc)
-    : SkGradientShaderBase(desc, SkMatrix::MakeTrans(-center.x(), -center.y()))
+    : SkGradientShaderBase(desc, SkMatrix::Translate(-center.x(), -center.y()))
     , fCenter(center)
     , fTBias(-t0)
     , fTScale(1 / (t1 - t0))
@@ -64,8 +64,7 @@
 void SkSweepGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* p,
                                            SkRasterPipeline*) const {
     p->append(SkRasterPipeline::xy_to_unit_angle);
-    p->append_matrix(alloc, SkMatrix::Concat(SkMatrix::MakeScale(fTScale, 1),
-                                             SkMatrix::MakeTrans(fTBias , 0)));
+    p->append_matrix(alloc, SkMatrix::Scale(fTScale, 1) * SkMatrix::Translate(fTBias, 0));
 }
 
 skvm::F32 SkSweepGradient::transformT(skvm::Builder* p, skvm::Uniforms* uniforms,
diff --git a/src/shaders/gradients/SkTwoPointConicalGradient.cpp b/src/shaders/gradients/SkTwoPointConicalGradient.cpp
index 811d719..42b3d6f 100644
--- a/src/shaders/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/shaders/gradients/SkTwoPointConicalGradient.cpp
@@ -62,7 +62,7 @@
         }
         // Concentric case: we can pretend we're radial (with a tiny twist).
         const SkScalar scale = sk_ieee_float_divide(1, std::max(r0, r1));
-        gradientMatrix = SkMatrix::MakeTrans(-c1.x(), -c1.y());
+        gradientMatrix = SkMatrix::Translate(-c1.x(), -c1.y());
         gradientMatrix.postScale(scale, scale);
 
         gradientType = Type::kRadial;
@@ -188,8 +188,7 @@
         auto scale =  std::max(fRadius1, fRadius2) / dRadius;
         auto bias  = -fRadius1 / dRadius;
 
-        p->append_matrix(alloc, SkMatrix::Concat(SkMatrix::MakeTrans(bias, 0),
-                                                 SkMatrix::MakeScale(scale, 1)));
+        p->append_matrix(alloc, SkMatrix::Translate(bias, 0) * SkMatrix::Scale(scale, 1));
         return;
     }
 
diff --git a/src/sksl/SkSLCPPUniformCTypes.cpp b/src/sksl/SkSLCPPUniformCTypes.cpp
index 061ad55..f18c410 100644
--- a/src/sksl/SkSLCPPUniformCTypes.cpp
+++ b/src/sksl/SkSLCPPUniformCTypes.cpp
@@ -176,7 +176,7 @@
 
     REGISTER(Layout::CType::kSkMatrix, { "half3x3", "float3x3", "double3x3" },
         "${pdman}.setSkMatrix(${uniform}, ${var})",                                // to gpu
-        "SkMatrix::MakeScale(SK_FloatNaN)",                                        // default value
+        "SkMatrix::Scale(SK_FloatNaN, SK_FloatNaN)",                               // default value
         "!${oldVar}.cheapEqualTo(${newVar})"),                                     // dirty check
 
     REGISTER(Layout::CType::kSkM44,  { "half4x4", "float4x4", "double4x4" },
diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp
index 7bdeb48..3a094c3 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -114,10 +114,10 @@
     // TODO
 }
 void SkLuaCanvas::didScale(SkScalar x, SkScalar y) {
-    this->didConcat(SkMatrix::MakeScale(x, y));
+    this->didConcat(SkMatrix::Scale(x, y));
 }
 void SkLuaCanvas::didTranslate(SkScalar x, SkScalar y) {
-    this->didConcat(SkMatrix::MakeTrans(x, y));
+    this->didConcat(SkMatrix::Translate(x, y));
 }
 void SkLuaCanvas::didConcat(const SkMatrix& matrix) {
     switch (matrix.getType()) {
diff --git a/src/utils/SkShadowUtils.cpp b/src/utils/SkShadowUtils.cpp
index 869997f..ade48e3 100644
--- a/src/utils/SkShadowUtils.cpp
+++ b/src/utils/SkShadowUtils.cpp
@@ -594,8 +594,7 @@
             SkAutoDeviceTransformRestore adr(
                     this,
                     hasPerspective ? SkMatrix::I()
-                                   : SkMatrix::Concat(this->localToDevice(),
-                                                      SkMatrix::MakeTrans(tx, ty)));
+                                   : this->localToDevice() * SkMatrix::Translate(tx, ty));
             this->drawVertices(vertices, mode, paint);
         }
     };