Skip to content

Allow testable animations #140

@ecton

Description

@ecton

One challenge in creating animated PNGs is that animations execute in real time. Ideally, we should have a way to control the animation pipeline in a test.

I think this can partially be done by using a thread local during tests. When an animation handle is spawned/launched, a thread local is checked to see if it should be sent to a specific animation pipeline. If none is set, the global pipeline will be used.

The animation thread should install itself as a local pipeline, ensuring that all callbacks invoked from the animation thread will create animations that run on the current animation thread.

We then can allow a manual mode for the animation system, and the VirtualWindow can automatically step the animation system by the elapsed duration.

This finally should allow us to make AnimationRecorder record as fast as possible, simulating time rather than requiring the tests to run in real time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions