media/android: Increase max_images limit for AImageReader.

Currently we assume that atmost 2 buffers can be acquired simultaneously
from AImageReader, the buffer currently being used and the next buffer.
In UpdateTexImage we first acquire a new buffer before releasing the
previous one. The current limit is set to 3, one higher than the
expected usage.

But with SurfaceControl, the ownership of the buffer remains with the
framework until a frame/transaction is acked. Since we use triple
buffering, this means we can acquire upto 3 buffers simultaneously.
Update the max_images limit when setting AImageReader to account for
this usage pattern.

R=liberato@chromium.org

Bug: 889328
Change-Id: Id4e0f4a103c4e8549ffacad7052315304efd363f
Reviewed-on: https://chromium-review.googlesource.com/c/1468585
Auto-Submit: Khushal <khushalsagar@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631845}
1 file changed