compositor-drm: Reduce code duplication on drm_output_switch_mode()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 14 Dec 2012 15:37:30 +0000 (13:37 -0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 14 Dec 2012 16:27:58 +0000 (11:27 -0500)
commit6c01c9c51f612fa6ef12f2eb23f82fb9a190b02e
treebf0b8ccd81577e8be7f0a46eb15b548643f36e26
parent475cf154b154ae6aef26845df00b43b09ca231e6
compositor-drm: Reduce code duplication on drm_output_switch_mode()

Call drm_output_init_egl() instead of duplicating the gbm surface and
gl renderer state initialization code.

Note that this makes error handling a bit worse. Before, if we failed
to allocate a gbm surface we could still recover. Failing the renderer
state creation would lead to inconsisten state. Now we end up in
inconsistent state on both cases.
src/compositor-drm.c