[Impeller] Remove unused bounds method from typographer interface (flutter/engine#40406)
This commit is contained in:
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user