Camera2: Add prepare method for output buffer pre-allocation
Normally, buffers for camera output Surfaces are allocated as
needed. This minimizes memory overhead and time to first frame.
However, if allocation takes a long time, as it can do for full-resolution
output buffers, full frame rate may not be maintainable with the added
allocation overhead.
The prepare() method allows an application to indicate that buffers for
a given output Surface should be preallocated by the camera device.
Once the allocation is complete, the onSurfacePrepared callback is invoked.
The application may then use the prepared Surface without concerns about
allocation-caused delays.
Change-Id: I4f616dc87dd4346f408cf1ea37d48a642ceb57da
11 files changed