• Christopher Cameron's avatar
    Views: Add MRUCache of results from ShapeRunWithFont · 79c4dc9d
    Christopher Cameron authored
    Bookmark folders using Views are very janky (~5 fps, with the CPU
    at 100%). Calls to RenderTextHarfBuzz::ShapeRunWithFont account for
    almost all of this time.
    
    Many of the calls to ShapeRunWithFont are done with the same arguments
    every frame. To alleviate some of this jank, add a cache the results of
    this function call.
    
    Refactor RenderTextHarfBuzz::ShapeRunWithFont to be stateless, and add
    structures ShapeRunWithFontInput and ShapeRunWithFontOutput for the
    arguments and output of the function. Use ShapeRunWithFontInput as
    a cache key.
    
    Bug: 826265
    Change-Id: Ic6726c1152c44dc5cb0eccddf1ff3adcd060d8e7
    Reviewed-on: https://chromium-review.googlesource.com/1123456
    Commit-Queue: ccameron <ccameron@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572420}
    79c4dc9d
render_text_unittest.cc 216 KB