• Christopher Cameron's avatar
    HarfBuzz: Identify runs with common font parameters · 9801165f
    Christopher Cameron authored
    Optimization part 2.5 of ~3
    
    In ShapeRunsWithFont, identify runs that the same initial CommonParams
    and insert them into a RunVector. Change the rest of the shaping
    pipeline to operate on these RunVectors, and move most of the
    processing of CommonParams to be done once per RunVector instead of
    once per run.
    
    This change was intended to be part of the change to allow coalescing
    of similar calls into HarfBuzz (which may or may not land), but it was
    found to improve the performance in the cache hit case by a factor of
    almost 2.
    
    Bug: 862773
    Change-Id: I8df02c2a8622eb9be74a65191fad79613ff1da2d
    Reviewed-on: https://chromium-review.googlesource.com/1145904
    Commit-Queue: ccameron <ccameron@chromium.org>
    Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#577330}
    9801165f
render_text_harfbuzz.cc 76.9 KB