Remove SkScalarClampMax and SkScalarPin
Change-Id: Ic96a0ea2cd1bfd59ee3f236543e1d6dd102544ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269142
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/utils/SkPatchUtils.cpp b/src/utils/SkPatchUtils.cpp
index e905bf7..1c6c2ac 100644
--- a/src/utils/SkPatchUtils.cpp
+++ b/src/utils/SkPatchUtils.cpp
@@ -357,9 +357,9 @@
indices[i + 4] = indices[i + 2];
indices[i + 5] = (x + 1) * stride + y;
}
- v = SkScalarClampMax(v + 1.f / lodY, 1);
+ v = SkTPin(v + 1.f / lodY, 0.0f, 1.0f);
}
- u = SkScalarClampMax(u + 1.f / lodX, 1);
+ u = SkTPin(u + 1.f / lodX, 0.0f, 1.0f);
}
if (tmpColors) {
diff --git a/src/utils/SkShadowTessellator.cpp b/src/utils/SkShadowTessellator.cpp
index 3e237b0..943567f 100644
--- a/src/utils/SkShadowTessellator.cpp
+++ b/src/utils/SkShadowTessellator.cpp
@@ -913,8 +913,8 @@
// umbraColor is the interior value, penumbraColor the exterior value.
auto outset = SkDrawShadowMetrics::AmbientBlurRadius(baseZ);
auto inset = outset * SkDrawShadowMetrics::AmbientRecipAlpha(baseZ) - outset;
- inset = SkScalarPin(inset, 0, SkTMin(path.getBounds().width(),
- path.getBounds().height()));
+ inset = SkTPin(inset, 0.0f, SkTMin(path.getBounds().width(),
+ path.getBounds().height()));
if (!this->computePathPolygon(path, ctm)) {
return;