libweston: assert current_mode in weston_output_enable()
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 14 Sep 2017 13:17:59 +0000 (16:17 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 17 Apr 2018 12:19:57 +0000 (15:19 +0300)
commit586e1ac791e7a514b71db873b477b137f02aa0b4
tree44a31e40b54c66912d222fd111754f8f6ede8778
parentec25b0a844b8786fd20e107669c516f45372955a
libweston: assert current_mode in weston_output_enable()

The functions called here, particularly
weston_output_transform_scale_init(), rely on current mode being set.
The current mode must also be found in the mode list, though we don't
explicitly check it here.

current_mode not being set is a programmer error. It could be a backend
bug, but it could also be a libweston user bug not calling a set size
function.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
libweston/compositor.c