compositor-drm: Add explicit type member to drm_fb
authorDaniel Stone <daniels@collabora.com>
Tue, 4 Apr 2017 16:54:22 +0000 (17:54 +0100)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 7 Apr 2017 09:45:11 +0000 (12:45 +0300)
commitfc175a7ec8f8064ba764cb1e68ff6d3b9eb256ac
tree1a549992961b70186561a95815c3ee87b164a4ef
parenta7cba1d4cd4c9013c3ac6cb074fcb7842fb39283
compositor-drm: Add explicit type member to drm_fb

Rather than magically trying to infer what the buffer is and what we
should do with it when we go to destroy it, add an explicit type
instead.

In doing so, the test for dumb images (destroying them, but only if
they're not the 'live' ones) is removed. This was dead code, as the only
path which could cause us to shuffle images is drm_output_switch_mode.
This calls drm_output_release_fb before the images are reallocated in
drm_output_fini_pixman / drm_output_init_pixman, with the reallocation
unconditionally destroying the images, so can never be hit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
libweston/compositor-drm.c