• R
    Avoid copying of font table data · aaa4e347
    Raph Levien 提交于
    The hb_font_t object holds on to tables of font data, acquired through
    the MinikinFont::GetTable interface, which is based on copying data
    into caller-owned buffers. Now that we're caching lots of hb_font_t's,
    the cost of these buffers is significant.
    
    This patch moves to a different interface, inspired by HarfBuzz's
    hb_reference_table API, where the font can provide a pointer to the
    actual font data (which will often be mmap'ed, so it doesn't even
    consume physical RAM).
    
    Bug: 27860101
    Change-Id: Id766ab16a8d342bf7322a90e076e801271d527d4
    aaa4e347
Layout.cpp 32.8 KB