remove GrTextBlob::setMinAndMaxScale from API
Change-Id: I7940fc31c7504e651cc1d035c662e4c1a403574e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374358
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 456f5ac..8901097 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -1411,12 +1411,6 @@
bool GrTextBlob::hasPerspective() const { return fInitialMatrix.hasPerspective(); }
-void GrTextBlob::setMinAndMaxScale(SkScalar scaledMin, SkScalar scaledMax) {
- // we init fMaxMinScale and fMinMaxScale in the constructor
- fMaxMinScale = std::max(scaledMin, fMaxMinScale);
- fMinMaxScale = std::min(scaledMax, fMinMaxScale);
-}
-
bool GrTextBlob::canReuse(const SkPaint& paint, const SkMatrix& drawMatrix) {
// A singular matrix will create a GrTextBlob with no SubRuns, but unknown glyphs can
// also cause empty runs. If there are no subRuns, then regenerate.
@@ -1507,7 +1501,9 @@
const SkFont& runFont,
SkScalar minScale,
SkScalar maxScale) {
- this->setMinAndMaxScale(minScale, maxScale);
+
+ fMaxMinScale = std::max(minScale, fMaxMinScale);
+ fMinMaxScale = std::min(maxScale, fMinMaxScale);
fSubRunList.append(SDFTSubRun::Make(drawables, runFont, strikeSpec, this, &fAlloc));
}
diff --git a/src/gpu/text/GrTextBlob.h b/src/gpu/text/GrTextBlob.h
index 2f83d88..eff3e80 100644
--- a/src/gpu/text/GrTextBlob.h
+++ b/src/gpu/text/GrTextBlob.h
@@ -404,7 +404,6 @@
bool hasPerspective() const;
const SkMatrix& initialMatrix() const { return fInitialMatrix; }
- void setMinAndMaxScale(SkScalar scaledMin, SkScalar scaledMax);
std::tuple<SkScalar, SkScalar> scaleBounds() const {
return {fMaxMinScale, fMinMaxScale};
}