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/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);