UPSTREAM: cros_gralloc: Avoid using masks in handle_usage()
After https://crrev.com/c/5907583, handle_usage() tries to match
the entire value. An allocation with usage 0x100000203 from
BufferUsage::GPU_RENDER_TARGET |
BufferUsage::CPU_READ_OFTEN |
BufferUsage::FRONT_BUFFER
would fail to match the combined BUFFER_USAGE_FRONT_RENDERING_MASK
(`1U << 28 | 1ULL << 32`) because the allocation only sets a
single usage bit `BUFFER_USAGE_FRONT_RENDERING` (`1ULL << 32`)
and not the combined mask.
Bug: b/373474508
Test: vts -m VtsHalGraphicsAllocatorAidl_TargetTest
Change-Id: I926789a7aab937f2c2092475cb40ad9666b4f95f
2 files changed