weston/libweston
Daniel Stone 6e7a961d43 compositor-drm: Refcount drm_fb
Sometimes we need to duplicate an existing drm_fb, e.g. when
pageflipping to the same buffer to kickstart the repaint loop. To handle
situations like these, and simplify resource management for dumb and
cursor buffers, refcount drm_fb.

drm_fb_get_from_bo has a path where it may reuse a drm_fb, if the BO has
been imported and not released yet. As drm_fb_unref now relies on actual
refcounting (backed up by asserts), we add a balancing drm_fb_ref() to
the path where we return a reused drm_fb.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-04-07 12:45:12 +03:00
..
2016-07-26 16:26:08 -07:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-06-23 17:44:54 +03:00
2016-07-26 16:26:08 -07:00