[Impeller] Remove unused bounds method from typographer interface (flutter/engine#40406)

This commit is contained in:
Brandon DeRosier
2023-03-17 18:51:51 -07:00
committed by GitHub
parent 3563eeb8e7
commit c8f6d510d3
3 changed files with 0 additions and 23 deletions

View File

@@ -28,17 +28,6 @@ bool TypefaceSkia::IsEqual(const Typeface& other) const {
return sk_other->typeface_ == typeface_;
}
Rect TypefaceSkia::GetBoundingBox() const {
if (!IsValid()) {
return {};
}
const auto bounds = typeface_->getBounds();
return Rect::MakeLTRB(bounds.left(), bounds.top(), bounds.right(),
bounds.bottom());
}
const sk_sp<SkTypeface>& TypefaceSkia::GetSkiaTypeface() const {
return typeface_;
}

View File

@@ -28,9 +28,6 @@ class TypefaceSkia final : public Typeface,
// |Comparable<Typeface>|
bool IsEqual(const Typeface& other) const override;
// |Typeface|
Rect GetBoundingBox() const override;
const sk_sp<SkTypeface>& GetSkiaTypeface() const;
private:

View File

@@ -24,15 +24,6 @@ class Typeface : public Comparable<Typeface> {
virtual bool IsValid() const = 0;
//----------------------------------------------------------------------------
/// @brief Get the union of the bounding boxes of all glyphs in the
/// typeface. This box is unit-scaled and conservatively large to
/// cover all glyphs.
///
/// @return The conservative unit-scaled bounding box.
///
virtual Rect GetBoundingBox() const = 0;
private:
FML_DISALLOW_COPY_AND_ASSIGN(Typeface);
};