-
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: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Cr-Commit-Position: refs/heads/master@{#513710}
3824a888