OSDN Git Service

egl/android: fix buffer_count for applications setting max count
authorTapani Pälli <tapani.palli@intel.com>
Tue, 21 Jan 2020 11:01:51 +0000 (13:01 +0200)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 28 Jan 2020 16:54:25 +0000 (08:54 -0800)
commit386b9c5e7ead64936da533164c9e8575dba26088
tree22bc1f91bd089201a517e23789293654015a2e4c
parent4f6044a27336cc75f1f26eaeb0afbcfac27190b9
egl/android: fix buffer_count for applications setting max count

Problem with previous solution was that it did not take account that
some applications may set a max count for buffers. Therefore we need to
query both min and max and clamp our setting based on that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2373
Fixes: be08e6a4496 ("egl/android: Restrict minimum triple buffering for android color_buffers")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3480>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3480>
(cherry picked from commit 39e7492d33c89ee7049d5bc07267d131cc6a1ff9)
.pick_status.json
src/egl/drivers/dri2/platform_android.c