diff options
author | emersion <contact@emersion.fr> | 2018-03-30 13:18:50 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-30 17:16:35 -0400 |
commit | a776ecbb860608e0f75430a53ea75a6ed19ac746 (patch) | |
tree | f664978ac74c3fc13993ed709cc1015c025d3344 /sway/tree | |
parent | 5ac5e7d5a69e9d45a20d6d787a2665279845c74b (diff) |
Add lite damage tracking
This skips the renderer if nothing has changed, and renders
everything otherwise.
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 2 | ||||
-rw-r--r-- | sway/tree/output.c | 5 | ||||
-rw-r--r-- | sway/tree/view.c | 18 |
3 files changed, 22 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index c3cf6c64..8705edc7 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -6,8 +6,8 @@ #include <wayland-server.h> #include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_wl_shell.h> +#include "log.h" #include "sway/config.h" -#include "sway/tree/container.h" #include "sway/input/input-manager.h" #include "sway/input/seat.h" #include "sway/ipc-server.h" diff --git a/sway/tree/output.c b/sway/tree/output.c index 2246cb11..7248fd00 100644 --- a/sway/tree/output.c +++ b/sway/tree/output.c @@ -26,9 +26,12 @@ struct sway_container *container_output_destroy(struct sway_container *output) { } } - wl_list_remove(&output->sway_output->frame.link); wl_list_remove(&output->sway_output->destroy.link); wl_list_remove(&output->sway_output->mode.link); + wl_list_remove(&output->sway_output->transform.link); + + wl_list_remove(&output->sway_output->damage_destroy.link); + wl_list_remove(&output->sway_output->damage_frame.link); wlr_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name); container_destroy(output); diff --git a/sway/tree/view.c b/sway/tree/view.c index 480ff693..b7d1a41b 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1,9 +1,10 @@ #include <wayland-server.h> #include <wlr/types/wlr_output_layout.h> +#include "log.h" +#include "sway/output.h" #include "sway/tree/container.h" #include "sway/tree/layout.h" #include "sway/tree/view.h" -#include "log.h" const char *view_get_title(struct sway_view *view) { if (view->iface.get_prop) { @@ -105,3 +106,18 @@ struct sway_container *container_view_destroy(struct sway_container *view) { arrange_windows(parent, -1, -1); return parent; } + +void view_damage_whole(struct sway_view *view) { + struct sway_container *cont = NULL; + for (int i = 0; i < root_container.children->length; ++i) { + cont = root_container.children->items[i]; + if (cont->type == C_OUTPUT) { + output_damage_whole_view(cont->sway_output, view); + } + } +} + +void view_damage_from(struct sway_view *view) { + // TODO + view_damage_whole(view); +} |