Skip to content

Commit

Permalink
Add a repaint completion signal for weston output
Browse files Browse the repository at this point in the history
This signal is particular needed for externally compositing surfaces.
An external renderer can do buffer swap only after render completion is
signalled. It is possible that in the render completion signal
callback external renderer can render, buffer swap and schedule next
repaint. Next repaint won't be scheduled if frame_signal is used
and hence a new signal is added.

Signed-off-by: harsha.mm <harsha.manjulamallikarjun@in.bosch.com>
  • Loading branch information
HarshaMM committed Nov 16, 2017
1 parent a51ff22 commit d5646de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libweston/compositor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,6 +2327,9 @@ weston_output_repaint(struct weston_output *output)
animation->frame(animation, output, output->frame_time);
}

/*Signal hinting that the rendering for this output is complete*/
wl_signal_emit(&output->render_complete_signal, output);

TL_POINT("core_repaint_posted", TLP_OUTPUT(output), TLP_END);

return r;
Expand Down Expand Up @@ -4634,6 +4637,7 @@ weston_output_enable(struct weston_output *output)

wl_signal_init(&output->frame_signal);
wl_signal_init(&output->frame_finish_signal);
wl_signal_init(&output->render_complete_signal);
wl_signal_init(&output->destroy_signal);
wl_list_init(&output->animation_list);
wl_list_init(&output->resource_list);
Expand Down
1 change: 1 addition & 0 deletions libweston/compositor.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ struct weston_output {
int dirty;
struct wl_signal frame_signal;
struct wl_signal frame_finish_signal;
struct wl_signal render_complete_signal;
struct wl_signal destroy_signal;
int move_x, move_y;
uint32_t frame_time; /* presentation timestamp in milliseconds */
Expand Down

0 comments on commit d5646de

Please sign in to comment.