Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebeb8179 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Remove obsolete interface GetTable."

parents 2dfbd8c5 9cd73b68
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -65,23 +65,6 @@ void MinikinFontSkia::GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id,
    bounds->mBottom = skBounds.fBottom;
}

const void* MinikinFontSkia::GetTable(uint32_t tag, size_t* size,
        minikin::MinikinDestroyFunc* destroy) {
    // we don't have a buffer to the font data, copy to own buffer
    const size_t tableSize = mTypeface->getTableSize(tag);
    *size = tableSize;
    if (tableSize == 0) {
        return nullptr;
    }
    void* buf = malloc(tableSize);
    if (buf == nullptr) {
        return nullptr;
    }
    mTypeface->getTableData(tag, 0, tableSize, buf);
    *destroy = free;
    return buf;
}

SkTypeface *MinikinFontSkia::GetSkTypeface() const {
    return mTypeface.get();
}
+0 −2
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ public:
    void GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id,
        const minikin::MinikinPaint &paint) const;

    const void* GetTable(uint32_t tag, size_t* size, minikin::MinikinDestroyFunc* destroy);

    SkTypeface* GetSkTypeface() const;
    sk_sp<SkTypeface> RefSkTypeface() const;