Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Conversation

@LGFae
Copy link
Owner

@LGFae LGFae commented Oct 20, 2025

No description provided.

LGFae added 5 commits October 19, 2025 17:22
This merges the TransitionAnimator and ImageAnimator into one Animator
enum. It has the advantage of using less memory than before, because we
always allocated the same amount of TransitionAnimator and ImageAnimator
anyway, and Animator has the same size as TransitionAnimator. It also
cleans up a bit of the code, since we can remove some duplicated things.
We can use output_name as an unique id, so that we do not need to wrap
everything around `Rc` and `RefCell`.

In some places, this will entail some extra cost in filtering the
`wallpaper` iterator for just those that are part of a group. However,
because the vast majority of our users will probably not have anything
beyong 4 outputs, the cost of this is pretty low. On the other hand,
previously, every access to a wallpaper incurred one extra pointer load
from the `Rc`, and one extra branch for the `RefCell`.

On the other hand, this should improve memory usage and cache access
patterns. This means overall this should also improve performance, or at
the very least not negatively affect it very much.
Instead, the animation group is determined by its index in the animation
vector. This reduces the amount of data we need to keep track of and
simplifies a few things.
@LGFae LGFae closed this Oct 22, 2025
@LGFae LGFae deleted the change-animation-setup branch October 22, 2025 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants