mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 00:56:54 +00:00
libweston: intersect all backends' supported presentation clocks
In preparation for multi-backend support, determine the presentation clocks that are supported by all backends. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This commit is contained in:
parent
183c309b85
commit
3d50069afc
|
@ -9143,9 +9143,11 @@ weston_compositor_set_presentation_clock(struct weston_compositor *compositor,
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
weston_compositor_backends_loaded(struct weston_compositor *compositor)
|
weston_compositor_backends_loaded(struct weston_compositor *compositor)
|
||||||
{
|
{
|
||||||
struct weston_backend *backend =
|
struct weston_backend *backend;
|
||||||
wl_container_of(compositor->backend_list.next, backend, link);
|
uint32_t supported_clocks = 0xffffffff;
|
||||||
uint32_t supported_clocks = backend->supported_presentation_clocks;
|
|
||||||
|
wl_list_for_each(backend, &compositor->backend_list, link)
|
||||||
|
supported_clocks &= backend->supported_presentation_clocks;
|
||||||
|
|
||||||
if (weston_compositor_set_presentation_clock(compositor,
|
if (weston_compositor_set_presentation_clock(compositor,
|
||||||
supported_clocks) < 0) {
|
supported_clocks) < 0) {
|
||||||
|
|
Loading…
Reference in a new issue