opt: Avoid unnecessary animation calculations

This commit is contained in:
DreamMaoMao 2026-07-07 13:31:53 +08:00
parent 516052ff14
commit 1da0cfba47
3 changed files with 313 additions and 501 deletions

File diff suppressed because it is too large Load diff

View file

@ -2148,7 +2148,8 @@ int32_t dwindle_set_split_direction(Client *c, bool istoggle, bool horizontal) {
leaf->custom_leaf_split_h = false; leaf->custom_leaf_split_h = false;
} }
bool hit_no_border = check_hit_no_border(c); bool hit_no_border = check_hit_no_border(c);
client_draw_split_border(c, hit_no_border); struct ivec2 offsets = compute_edge_offsets(c);
client_draw_split_border(c, hit_no_border, offsets);
return 0; return 0;
} }

View file

@ -843,7 +843,7 @@ get_nearest_output_mode(struct wlr_output *output, int32_t width,
static void client_commit(Client *c); static void client_commit(Client *c);
static void layer_commit(LayerSurface *l); static void layer_commit(LayerSurface *l);
static void client_draw_border(Client *c); static void client_draw_border(Client *c, struct ivec2 offsets);
static void client_set_opacity(Client *c, double opacity); static void client_set_opacity(Client *c, double opacity);
static void init_baked_points(void); static void init_baked_points(void);
static void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer, static void scene_buffer_apply_opacity(struct wlr_scene_buffer *buffer,