mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-15 05:34:22 -04:00
backend/drm: store pending FB in state
Instead of having a pending_fb field on the struct wlr_drm_plane, move it to struct wlr_drm_connector_state. That way, there's no risk having a stale pending FB around: the state doesn't survive across tests and commits. The cursor is a special case because it's disconnected from the atomic state: the wlr_backend_impl.set_cursor hook sets the cursor for the next commit. Move the field to wlr_drm_connector.cursor_pending_fb.
This commit is contained in:
parent
ae61cd6bfb
commit
037b21647b
6 changed files with 70 additions and 51 deletions
|
|
@ -294,8 +294,8 @@ static bool atomic_crtc_commit(struct wlr_drm_connector *conn,
|
|||
if (crtc->props.vrr_enabled != 0) {
|
||||
atomic_add(&atom, crtc->id, crtc->props.vrr_enabled, vrr_enabled);
|
||||
}
|
||||
set_plane_props(&atom, drm, crtc->primary, plane_get_next_fb(crtc->primary),
|
||||
crtc->id, 0, 0);
|
||||
set_plane_props(&atom, drm, crtc->primary, state->primary_fb, crtc->id,
|
||||
0, 0);
|
||||
if (crtc->primary->props.fb_damage_clips != 0) {
|
||||
atomic_add(&atom, crtc->primary->id,
|
||||
crtc->primary->props.fb_damage_clips, fb_damage_clips);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue