HACK: egl/android: Partially handle HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED

There is no API available to properly query the IMPLEMENTATION_DEFINED
format. As a workaround we rely here on gralloc allocating either
an arbitrary YCbCr 4:2:0 or RGBX_8888, with the latter being recognized
by lock_ycbcr failing.

(replaces commmit b0147e6603835a2cc64a99c5a6caa3316d6c2172 from
arc-12.1.0-pre2 branch / CL:367216)

BUG=b:28671744
BUG=b:33533853
BUG=b:37615277
TEST=android.view.cts.WindowTest#testSetLocalFocus
TEST=No CTS regressions on cyan and reef.
TEST=Camera preview on Poppy looks correctly

Change-Id: Ifca4a7f82a6d04ccb50e0ee17f1998ffb243f85f
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/566793
Reviewed-by: Chad Versace <chadversary@chromium.org>
(cherry picked from commit 8e0cdc96548416708890eee94b6cff6cd68e5ca5)

BUG=b:69553386
TEST=No regressions on Eve in `cts-tradefed run cts -m CtsDeqpTestCases`.

Change-Id: I226caf644e34312628a7606fbcf65b567cf338d9
Reviewed-on: https://chromium-review.googlesource.com/780840
Commit-Queue: Chad Versace <chadversary@chromium.org>
Tested-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
1 file changed