Don't schedule unnecessary output frames, and simplify damage functions

The `whole` argument has been removed from damage_surface_iterator
because it was never used. As this function now only deals with partial
damaging, it's been changed to return early if there is no damage and
avoids scheduling a frame unnecessarily.

With the removal of the `whole` argument, output_damage_from_view just
called output_damage_view with the same arguments, so I've combined
these into the one function and renamed it to
output_damage_view_surfaces.

Lastly, output_damage_whole_container_iterator is now removed as it was
never used. output_damage_whole_container just damages the container
including decorations and doesn't care about surfaces.
This commit is contained in:
Ryan Dwyer 2018-10-04 23:35:07 +10:00
parent 0d5c2f75b5
commit 26024ad434
3 changed files with 28 additions and 49 deletions

View file

@ -75,7 +75,7 @@ void output_damage_whole(struct sway_output *output);
void output_damage_surface(struct sway_output *output, double ox, double oy,
struct wlr_surface *surface, bool whole);
void output_damage_from_view(struct sway_output *output,
void output_damage_view_surfaces(struct sway_output *output,
struct sway_view *view);
void output_damage_box(struct sway_output *output, struct wlr_box *box);