egl/android: Update color_buffers querying for buffer age
authorNataraj Deshpande <nataraj.deshpande@intel.com>
Fri, 19 Jul 2019 15:44:13 +0000 (08:44 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 22 Jul 2019 19:31:34 +0000 (12:31 -0700)
commit0661c357c60313905f35ee31a270bd5d5cf555b7
tree9dc5a377380ac2f34dbdc398475fca891122eb14
parent0345aeeb4015e824574ceca4f47ade512963c215
egl/android: Update color_buffers querying for buffer age

color_buffers[] is currently hard coded to 3 for android which fails
in droid_window_dequeue_buffer when ANativeWindow creates color_buffers
>3 while querying buffer age during dEQP partial_update tests on chromeOS.

The patch removes static color_buffers[], queries for MIN_UNDEQUEUED_BUFFERS,
sets native window buffer count and allocates the correct number of
color_buffers as per android.

Fixes dEQP-EGL.functional.partial_update* tests on chromebooks with
enabling EGL_KHR_partial_update.

v2: update comment instead of removing (Eric Engestrom)
v3: change static array to dynamic allocated color_buffers
    querying MIN_UNDEQUEUED_BUFFERS (Chia-I Wu olv@chromium.org)

Fixes: 2acc69da8ce "EGL/Android: Add EGL_EXT_buffer_age extension"
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_android.c