dri2: dri2_make_current() fold multiple if blocks
authorLuigi Santivetti <luigi.santivetti@imgtec.com>
Tue, 30 Jun 2020 09:14:08 +0000 (10:14 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Jul 2020 18:42:03 +0000 (18:42 +0000)
commit6b12999ef7c5b754df0919cdc9e354d58abbc4fb
tree37533661f0905f5411be7d17a8e86bef60ee7c2a
parent29c39aeaabc126fe590cef9efd377fb58746c924
dri2: dri2_make_current() fold multiple if blocks

dri2_make_current() has become long and convoluted. Address
this by folding together multiple if blocks checking for the
same variable.

Cc: mesa-stable
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5707>
src/egl/drivers/dri2/egl_dri2.c