mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-03 01:41:10 -05:00
output: trigger frame/present events on all commits on enabled output
Up until now, frame/present events were only triggered when the user submitted a buffer. Change the wlr_output API so that these events are triggered when any commit is applied on an enabled output. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3708
This commit is contained in:
parent
462f04db9e
commit
e5fc8cd4c7
7 changed files with 24 additions and 9 deletions
|
|
@ -715,12 +715,10 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t flags = 0;
|
||||
if (pending.base->committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
if (!drm_connector_state_update_primary_fb(conn, &pending)) {
|
||||
goto out;
|
||||
}
|
||||
flags |= DRM_MODE_PAGE_FLIP_EVENT;
|
||||
|
||||
// wlr_drm_interface.crtc_commit will perform either a non-blocking
|
||||
// page-flip, either a blocking modeset. When performing a blocking modeset
|
||||
|
|
@ -732,9 +730,6 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
|
|||
goto out;
|
||||
}
|
||||
}
|
||||
if (pending.modeset && pending.active) {
|
||||
flags |= DRM_MODE_PAGE_FLIP_EVENT;
|
||||
}
|
||||
if (pending.base->committed & WLR_OUTPUT_STATE_LAYERS) {
|
||||
if (!drm_connector_set_pending_layer_fbs(conn, pending.base)) {
|
||||
return false;
|
||||
|
|
@ -751,6 +746,8 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t flags = pending.active ? DRM_MODE_PAGE_FLIP_EVENT : 0;
|
||||
|
||||
ok = drm_crtc_commit(conn, &pending, flags, false);
|
||||
if (!ok) {
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue