renderToHardwareBuffer

Renders the stored image into a caller-provided HardwareBuffer with format HardwareBuffer.RGBA_8888. Combined with Bitmap.wrapHardwareBuffer (API 29+) this enables zero-copy GPU sampling — HWUI imports the buffer as an EGL/Vulkan external image once and samples it directly on subsequent draws.

The buffer must be allocated with HardwareBuffer.USAGE_CPU_WRITE_RARELY (or HardwareBuffer.USAGE_CPU_WRITE_OFTEN) and HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE.

Requires API 26+.