Skip to content
  • Klaus Weidner's avatar
    AHardwareBuffer-based GpuMemoryBuffer implementation · 3824a888
    Klaus Weidner authored
    AHardwareBuffer support is included on Android O and up. The NDK
    functions are included as of platform level 26, but Chromium currently
    doesn't use this as the target level, so we have to use dynamic
    loading to get the symbols at runtime.
    
    This is encapsulated in gfx::AndroidHardwareBufferCompat which makes
    it a bit easier to work with them across Android versions.
    
    The implementation adds a new ANDROID_HARDWARE_BUFFER subtype to the
    SharedMemoryHandle Android implementation in addition to the pre-existing
    ashmem support, including IPC transport via a SocketPair. It uses one end
    to write the native object using a NDK call, and the other end is a file
    descriptor sendable via usual IPC methods from which the receiver can fetch
    the object.
    
    BUG=761432
    
    Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
    Change-Id: I9edfa733ffccea21dd58a3940aa96cb6955c8f09
    Reviewed-on: https://chromium-review.googlesource.com/680100
    
    
    Commit-Queue: Klaus Weidner <klausw@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
    Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
    Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
    Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#513710}
    3824a888