mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
rootston: replace view_damage with view_apply_damage and view_damage_whole
This commit is contained in:
parent
7f5a538cb7
commit
96d6f34edd
7 changed files with 35 additions and 17 deletions
|
|
@ -379,7 +379,7 @@ static int handle_repaint(void *data) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void output_damage_surface(struct roots_output *output,
|
||||
static void output_damage_whole_surface(struct roots_output *output,
|
||||
struct wlr_surface *surface, double lx, double ly) {
|
||||
if (!wlr_surface_has_buffer(surface)) {
|
||||
return;
|
||||
|
|
@ -392,17 +392,24 @@ static void output_damage_surface(struct roots_output *output,
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: use surface damage
|
||||
|
||||
pixman_region32_union_rect(&output->damage, &output->damage, box.x, box.y,
|
||||
box.width, box.height);
|
||||
}
|
||||
|
||||
void output_damage_view(struct roots_output *output, struct roots_view *view) {
|
||||
output_damage_surface(output, view->wlr_surface, view->x, view->y);
|
||||
void output_damage_whole_view(struct roots_output *output,
|
||||
struct roots_view *view) {
|
||||
output_damage_whole_surface(output, view->wlr_surface, view->x, view->y);
|
||||
|
||||
// TODO: subsurfaces, popups, etc
|
||||
}
|
||||
|
||||
void output_damage_from_view(struct roots_output *output,
|
||||
struct roots_view *view) {
|
||||
// TODO: use surface damage
|
||||
output_damage_whole_view(output, view);
|
||||
}
|
||||
|
||||
static void set_mode(struct wlr_output *output,
|
||||
struct roots_output_config *oc) {
|
||||
int mhz = (int)(oc->mode.refresh_rate * 1000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue