mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-18 06:47:31 -04:00
presentation_time: Introduce wlr_presentation_send_presented
Sends the presentation event immediately without any buffering to a surface.
This commit is contained in:
parent
ac09d91baa
commit
5e2a1e44f5
2 changed files with 20 additions and 0 deletions
|
|
@ -96,4 +96,12 @@ void wlr_presentation_surface_sampled_on_output(
|
||||||
struct wlr_presentation *presentation, struct wlr_surface *surface,
|
struct wlr_presentation *presentation, struct wlr_surface *surface,
|
||||||
struct wlr_output *output);
|
struct wlr_output *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send the presentation event immediately to this surface if the surface is
|
||||||
|
* asking for presentation events. This must be called during the present handler
|
||||||
|
* of an output.
|
||||||
|
*/
|
||||||
|
void wlr_presentation_send_presented(struct wlr_presentation *presentation,
|
||||||
|
struct wlr_surface *surface, struct wlr_presentation_event *event);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -325,3 +325,15 @@ void wlr_presentation_surface_sampled_on_output(
|
||||||
feedback->output_destroy.notify = feedback_handle_output_destroy;
|
feedback->output_destroy.notify = feedback_handle_output_destroy;
|
||||||
wl_signal_add(&output->events.destroy, &feedback->output_destroy);
|
wl_signal_add(&output->events.destroy, &feedback->output_destroy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wlr_presentation_send_presented(struct wlr_presentation *presentation,
|
||||||
|
struct wlr_surface *surface, struct wlr_presentation_event *event) {
|
||||||
|
struct wlr_presentation_feedback *feedback =
|
||||||
|
wlr_presentation_surface_sampled(presentation, surface);
|
||||||
|
if (!feedback) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wlr_presentation_feedback_send_presented(feedback, event);
|
||||||
|
wlr_presentation_feedback_destroy(feedback);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue