Implement damage tracking

This commit is contained in:
Johan Malm 2021-01-09 22:51:20 +00:00
parent 695ce28b55
commit 54804fd3df
15 changed files with 881 additions and 321 deletions

32
src/damage.c Normal file
View file

@ -0,0 +1,32 @@
#include "labwc.h"
void
damage_all_outputs(struct server *server)
{
struct output *output;
wl_list_for_each(output, &server->outputs, link) {
if (output && output->wlr_output && output->damage) {
wlr_output_damage_add_whole(output->damage);
}
}
}
void
damage_view_part(struct view *view)
{
struct output *output;
wl_list_for_each (output, &view->server->outputs, link) {
output_damage_surface(output, view->surface, view->x, view->y,
false);
}
}
void
damage_view_whole(struct view *view)
{
struct output *output;
wl_list_for_each (output, &view->server->outputs, link) {
output_damage_surface(output, view->surface, view->x, view->y,
true);
}
}