mirror of
https://github.com/swaywm/sway.git
synced 2025-11-14 06:59:47 -05:00
Add lite damage tracking
This skips the renderer if nothing has changed, and renders everything otherwise.
This commit is contained in:
parent
5ac5e7d5a6
commit
a776ecbb86
11 changed files with 171 additions and 66 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue