opt: optimize layer animaiton frame count in multi monitor

This commit is contained in:
DreamMaoMao 2025-09-07 17:48:29 +08:00
parent 394e32dabd
commit 1e1e37e92d
4 changed files with 10 additions and 6 deletions

View file

@ -76,7 +76,7 @@ double find_animation_curve_at(double t, int type) {
return baked_points[up].y;
}
double output_frame_duration_ms() {
double all_output_frame_duration_ms() {
int32_t refresh_total = 0;
Monitor *m;
wl_list_for_each(m, &mons, link) {
@ -88,6 +88,10 @@ double output_frame_duration_ms() {
return 1000000.0 / refresh_total;
}
double output_frame_duration_ms(Monitor *m) {
return 1000000.0 / m->wlr_output->refresh;
}
static bool scene_node_snapshot(struct wlr_scene_node *node, int lx, int ly,
struct wlr_scene_tree *snapshot_tree) {
if (!node->enabled && node->type != WLR_SCENE_NODE_TREE) {