• Ken Rockot's avatar
    Base [android]: Introduce ScopedHardwareBufferHandle · 097248f0
    Ken Rockot authored
    This is a scoping wrapper around an owned AHardwareBuffer reference.
    
    Removes code in SharedMemory/SharedMemoryHandle to serve the same
    purpose, such that shared memory objects on Android are now always
    actually ashmem objects.
    
    Updates GpuMemoryBufferHandle and
    GpuMemoryBufferImplAndroidHardwareBuffer (the only existing use of the
    special not-really-shared-memory type) to use a raw AHarwdwareBuffer*
    (unowned) or ScopedHardwareBufferHandle (owned) instead.
    
    Also fixes a bug in MailboxToSurfaceBridge which was stealing an
    a AHardwareBuffer ref from its caller.
    
    Bug: 826213
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
    Change-Id: I9e8403ad9e120cc9c68012dd537a0bc4af9a513c
    Reviewed-on: https://chromium-review.googlesource.com/1014541
    Commit-Queue: Ken Rockot <rockot@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarDavid Reveman <reveman@chromium.org>
    Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#552723}
    097248f0
BUILD.gn 1.53 KB