• Khushal's avatar
    blink: Refactor ImageFrameGenerator to support multi-thread use. · 98afd4cc
    Khushal authored
    Currently ImageFrameGenerator can only be used for decoding from a
    single thread at a time, with the access to any decoder for this
    generator protected using the same mutex. This can result in janks where
    the same image is being animated by multiple compositors in the same
    process, since the decode tasks from these compositors can not execute
    in parallel.
    
    In order to allow multiple threads to use different decoders backed by
    the same generator, this change splits the piece in the generator which
    uses the decoder into a ImageDecoderWrapper. This makes it explicit that
    different decoders can be used concurrently, as long as the access is
    synchronized with a mutex per decoder.
    
    The change should be a no-op.
    
    R=chrishtr@chromium.org
    
    Bug: 872753
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: Ib31ca739fbf858e0dc292dc9b47f9fd4a087956d
    Reviewed-on: https://chromium-review.googlesource.com/1185629Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
    Commit-Queue: Khushal <khushalsagar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#585740}
    98afd4cc
BUILD.gn 73.3 KB