mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
scene: rename output_present event to output_sample
Using "present" is confusing here: the event is emitted when the buffer is being sampled to be displayed on an output, not when it's being presented on-screen. Rename to match the presentation-time terminology.
This commit is contained in:
parent
d8585d661c
commit
88942d43fd
3 changed files with 10 additions and 10 deletions
|
@ -122,7 +122,7 @@ struct wlr_scene_surface {
|
|||
struct wl_listener outputs_update;
|
||||
struct wl_listener output_enter;
|
||||
struct wl_listener output_leave;
|
||||
struct wl_listener output_present;
|
||||
struct wl_listener output_sample;
|
||||
struct wl_listener frame_done;
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_commit;
|
||||
|
@ -151,7 +151,7 @@ struct wlr_scene_buffer {
|
|||
struct wl_signal outputs_update; // struct wlr_scene_outputs_update_event
|
||||
struct wl_signal output_enter; // struct wlr_scene_output
|
||||
struct wl_signal output_leave; // struct wlr_scene_output
|
||||
struct wl_signal output_present; // struct wlr_scene_output
|
||||
struct wl_signal output_sample; // struct wlr_scene_output
|
||||
struct wl_signal frame_done; // struct timespec
|
||||
} events;
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ static void handle_scene_buffer_output_leave(
|
|||
wlr_surface_send_leave(surface->surface, output->output);
|
||||
}
|
||||
|
||||
static void handle_scene_buffer_output_present(
|
||||
static void handle_scene_buffer_output_sample(
|
||||
struct wl_listener *listener, void *data) {
|
||||
struct wlr_scene_surface *surface =
|
||||
wl_container_of(listener, surface, output_present);
|
||||
wl_container_of(listener, surface, output_sample);
|
||||
struct wlr_scene_output *scene_output = data;
|
||||
|
||||
if (surface->buffer->primary_output == scene_output) {
|
||||
|
@ -157,7 +157,7 @@ static void surface_addon_destroy(struct wlr_addon *addon) {
|
|||
wl_list_remove(&surface->outputs_update.link);
|
||||
wl_list_remove(&surface->output_enter.link);
|
||||
wl_list_remove(&surface->output_leave.link);
|
||||
wl_list_remove(&surface->output_present.link);
|
||||
wl_list_remove(&surface->output_sample.link);
|
||||
wl_list_remove(&surface->frame_done.link);
|
||||
wl_list_remove(&surface->surface_destroy.link);
|
||||
wl_list_remove(&surface->surface_commit.link);
|
||||
|
@ -208,8 +208,8 @@ struct wlr_scene_surface *wlr_scene_surface_create(struct wlr_scene_tree *parent
|
|||
surface->output_leave.notify = handle_scene_buffer_output_leave;
|
||||
wl_signal_add(&scene_buffer->events.output_leave, &surface->output_leave);
|
||||
|
||||
surface->output_present.notify = handle_scene_buffer_output_present;
|
||||
wl_signal_add(&scene_buffer->events.output_present, &surface->output_present);
|
||||
surface->output_sample.notify = handle_scene_buffer_output_sample;
|
||||
wl_signal_add(&scene_buffer->events.output_sample, &surface->output_sample);
|
||||
|
||||
surface->frame_done.notify = handle_scene_buffer_frame_done;
|
||||
wl_signal_add(&scene_buffer->events.frame_done, &surface->frame_done);
|
||||
|
|
|
@ -614,7 +614,7 @@ struct wlr_scene_buffer *wlr_scene_buffer_create(struct wlr_scene_tree *parent,
|
|||
wl_signal_init(&scene_buffer->events.outputs_update);
|
||||
wl_signal_init(&scene_buffer->events.output_enter);
|
||||
wl_signal_init(&scene_buffer->events.output_leave);
|
||||
wl_signal_init(&scene_buffer->events.output_present);
|
||||
wl_signal_init(&scene_buffer->events.output_sample);
|
||||
wl_signal_init(&scene_buffer->events.frame_done);
|
||||
pixman_region32_init(&scene_buffer->opaque_region);
|
||||
scene_buffer->opacity = 1;
|
||||
|
@ -1171,7 +1171,7 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren
|
|||
WLR_RENDER_BLEND_MODE_PREMULTIPLIED : WLR_RENDER_BLEND_MODE_NONE,
|
||||
});
|
||||
|
||||
wl_signal_emit_mutable(&scene_buffer->events.output_present, data->output);
|
||||
wl_signal_emit_mutable(&scene_buffer->events.output_sample, data->output);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1572,7 +1572,7 @@ static bool scene_entry_try_direct_scanout(struct render_list_entry *entry,
|
|||
wlr_output_state_copy(state, &pending);
|
||||
wlr_output_state_finish(&pending);
|
||||
|
||||
wl_signal_emit_mutable(&buffer->events.output_present, scene_output);
|
||||
wl_signal_emit_mutable(&buffer->events.output_sample, scene_output);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue