Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Remove unused bounds method from typographer interface #40406

Merged
merged 1 commit into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions impeller/typographer/backends/skia/typeface_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
}
Expand Down
3 changes: 0 additions & 3 deletions impeller/typographer/backends/skia/typeface_skia.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 0 additions & 9 deletions impeller/typographer/typeface.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down