• Khushal's avatar
    ui/gl [android]: Update Android NDK ABI for Surface Control. · 395b5154
    Khushal authored
    The notable changes from using the updated ABI are the use of read
    fences returned by the framework to synchronize release of resources in
    transaction acks.
    
    The current code has some shortcomings in terms of potentially reading
    the media buffers from GL (display compositor) and/or the framework
    (system compositor). We currently always bind every new buffer to a
    texture with an EGL fence wait, which is unnecessary if the buffer will
    be passed to the system compositor. On the other end, we always and only
    generate a read fence from GL that the AImageReader_deleteasync uses if
    the current image has no external refs when a new image is acquired.
    Ideally we should wait on read fences from GL and the framework if the
    buffer was read by both (possible since the overlay decision could change
    every frame), and only generate a read fence from GL if the buffer was
    used by the display compositor.
    
    All the above fence synchronization is meant to be correctly handled
    using SharedImages, which can handle a buffer being imported by different
    consumers and generating/synchronizing read fences bases on which API the
    buffer is read by. Ensuring that these cases are handled correctly is left
    until media is switched to Shared Images.
    
    TBR=nyquist@chromium.org
    R=liberato@chromium.org, piman@chromium.org
    
    Bug: 889328
    Change-Id: Ic9f49420540249c06943fd62f6fcba8830c6ccac
    Reviewed-on: https://chromium-review.googlesource.com/c/1434918
    Commit-Queue: Khushal <khushalsagar@chromium.org>
    Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
    Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
    Auto-Submit: Khushal <khushalsagar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#626799}
    395b5154
image_reader_gl_owner.h 4.12 KB