|
|
@ -18,6 +18,18 @@ static void output_handle_mode(struct wl_listener *listener, void *data) {
|
|
|
|
wlr_output_damage_add_whole(output_damage);
|
|
|
|
wlr_output_damage_add_whole(output_damage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void output_handle_transform(struct wl_listener *listener, void *data) {
|
|
|
|
|
|
|
|
struct wlr_output_damage *output_damage =
|
|
|
|
|
|
|
|
wl_container_of(listener, output_damage, output_transform);
|
|
|
|
|
|
|
|
wlr_output_damage_add_whole(output_damage);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void output_handle_scale(struct wl_listener *listener, void *data) {
|
|
|
|
|
|
|
|
struct wlr_output_damage *output_damage =
|
|
|
|
|
|
|
|
wl_container_of(listener, output_damage, output_scale);
|
|
|
|
|
|
|
|
wlr_output_damage_add_whole(output_damage);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void output_handle_needs_swap(struct wl_listener *listener, void *data) {
|
|
|
|
static void output_handle_needs_swap(struct wl_listener *listener, void *data) {
|
|
|
|
struct wlr_output_damage *output_damage =
|
|
|
|
struct wlr_output_damage *output_damage =
|
|
|
|
wl_container_of(listener, output_damage, output_needs_swap);
|
|
|
|
wl_container_of(listener, output_damage, output_needs_swap);
|
|
|
@ -57,6 +69,10 @@ struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) {
|
|
|
|
output_damage->output_destroy.notify = output_handle_destroy;
|
|
|
|
output_damage->output_destroy.notify = output_handle_destroy;
|
|
|
|
wl_signal_add(&output->events.mode, &output_damage->output_mode);
|
|
|
|
wl_signal_add(&output->events.mode, &output_damage->output_mode);
|
|
|
|
output_damage->output_mode.notify = output_handle_mode;
|
|
|
|
output_damage->output_mode.notify = output_handle_mode;
|
|
|
|
|
|
|
|
wl_signal_add(&output->events.transform, &output_damage->output_transform);
|
|
|
|
|
|
|
|
output_damage->output_transform.notify = output_handle_transform;
|
|
|
|
|
|
|
|
wl_signal_add(&output->events.scale, &output_damage->output_scale);
|
|
|
|
|
|
|
|
output_damage->output_scale.notify = output_handle_scale;
|
|
|
|
wl_signal_add(&output->events.needs_swap, &output_damage->output_needs_swap);
|
|
|
|
wl_signal_add(&output->events.needs_swap, &output_damage->output_needs_swap);
|
|
|
|
output_damage->output_needs_swap.notify = output_handle_needs_swap;
|
|
|
|
output_damage->output_needs_swap.notify = output_handle_needs_swap;
|
|
|
|
wl_signal_add(&output->events.frame, &output_damage->output_frame);
|
|
|
|
wl_signal_add(&output->events.frame, &output_damage->output_frame);
|
|
|
@ -72,6 +88,8 @@ void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
|
|
|
|
wl_signal_emit(&output_damage->events.destroy, output_damage);
|
|
|
|
wl_signal_emit(&output_damage->events.destroy, output_damage);
|
|
|
|
wl_list_remove(&output_damage->output_destroy.link);
|
|
|
|
wl_list_remove(&output_damage->output_destroy.link);
|
|
|
|
wl_list_remove(&output_damage->output_mode.link);
|
|
|
|
wl_list_remove(&output_damage->output_mode.link);
|
|
|
|
|
|
|
|
wl_list_remove(&output_damage->output_transform.link);
|
|
|
|
|
|
|
|
wl_list_remove(&output_damage->output_scale.link);
|
|
|
|
wl_list_remove(&output_damage->output_needs_swap.link);
|
|
|
|
wl_list_remove(&output_damage->output_needs_swap.link);
|
|
|
|
wl_list_remove(&output_damage->output_frame.link);
|
|
|
|
wl_list_remove(&output_damage->output_frame.link);
|
|
|
|
pixman_region32_fini(&output_damage->current);
|
|
|
|
pixman_region32_fini(&output_damage->current);
|
|
|
|