mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Implement damage tracking
This commit is contained in:
parent
695ce28b55
commit
54804fd3df
15 changed files with 881 additions and 321 deletions
32
src/damage.c
Normal file
32
src/damage.c
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue