aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2023-04-14 22:25:46 +0200
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2023-04-14 22:29:24 +0200
commit39be67df4605adb15e4e1673a0e8820802aeefc1 (patch)
treef531a935e009938d0123a289a72730d7251e6336
parentdae2deb3c9d22fe51c2c75328d693fdc92ea9b87 (diff)
wlr_scene: Send presentation event before direct scanout output commit
We were doing it too late before and surfaces were never getting the presentation event.
-rw-r--r--types/scene/wlr_scene.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index c33461f1..d5ebd64f 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -1541,6 +1541,8 @@ static bool scene_buffer_try_direct_scanout(struct wlr_scene_buffer *buffer,
return false;
}
+ wl_signal_emit_mutable(&buffer->events.output_present, scene_output);
+
state.committed |= WLR_OUTPUT_STATE_DAMAGE;
get_frame_damage(scene_output, &state.damage);
bool ok = wlr_output_commit_state(scene_output->output, &state);
@@ -1621,11 +1623,6 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
}
if (scanout) {
- struct wlr_scene_node *node = list_data[0];
-
- assert(node->type == WLR_SCENE_NODE_BUFFER);
- struct wlr_scene_buffer *buffer = wlr_scene_buffer_from_node(node);
- wl_signal_emit_mutable(&buffer->events.output_present, scene_output);
return true;
}