remove dead code around SkPaint::breakText
-- need to update google3 before landing this
Bug: skia:
Change-Id: Ibb8a5c1a622e77cd4064740b700a983036061ba6
Reviewed-on: https://skia-review.googlesource.com/c/177341
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index b927efd..c36dc25 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -3282,17 +3282,6 @@
##
-#Method size_t breakText(const void* text, size_t length, SkScalar maxWidth,
- SkScalar* measuredWidth = nullptr) const
-#In Measure_Text
-#Line # returns text that fits in a width ##
-#Populate
-
-#NoExample
-##
-
-##
-
#Method int getTextWidths(const void* text, size_t byteLength, SkScalar widths[],
SkRect bounds[] = nullptr) const
#In Measure_Text
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 007a328..f2ccae6 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -1027,28 +1027,7 @@
SkScalar measureText(const void* text, size_t length) const {
return this->measureText(text, length, nullptr);
}
-#endif
-#ifdef SK_SUPPORT_LEGACY_PAINT_BREAKTEXT
- /** Returns the bytes of text that fit within maxWidth.
- The text fragment fits if its advance width is less than or equal to maxWidth.
- Measures only while the advance is less than or equal to maxWidth.
- Returns the advance or the text fragment in measuredWidth if it not nullptr.
- Uses SkTextEncoding to decode text, SkTypeface to get the font metrics,
- and text size to scale the metrics.
- Does not scale the advance or bounds by fake bold or SkPathEffect.
-
- @param text character codes or glyph indices to be measured
- @param length number of bytes of text to measure
- @param maxWidth advance limit; text is measured while advance is less than maxWidth
- @param measuredWidth returns the width of the text less than or equal to maxWidth
- @return bytes of text that fit, always less than or equal to length
- */
- size_t breakText(const void* text, size_t length, SkScalar maxWidth,
- SkScalar* measuredWidth = nullptr) const;
-#endif
-
-#ifdef SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE
/** Retrieves the advance and bounds for each glyph in text, and returns
the glyph count in text.
Both widths and bounds may be nullptr.
diff --git a/src/core/SkPaint_text.cpp b/src/core/SkPaint_text.cpp
index e241176..5f216f5 100644
--- a/src/core/SkPaint_text.cpp
+++ b/src/core/SkPaint_text.cpp
@@ -346,14 +346,6 @@
#endif
-#ifdef SK_SUPPORT_LEGACY_PAINT_BREAKTEXT
-size_t SkPaint::breakText(const void* textD, size_t length, SkScalar maxWidth,
- SkScalar* measuredWidth) const {
- return SkFont::LEGACY_ExtractFromPaint(*this).breakText(textD, length,
- this->getTextEncoding(), maxWidth, measuredWidth);
-}
-#endif
-
///////////////////////////////////////////////////////////////////////////////
#ifdef SK_SUPPORT_LEGACY_PAINT_TEXTMEASURE