Skip to content

Animations and redrawing optimisations - #185

Merged
kunitoki merged 14 commits into
mainfrom
dev/optimise_animations
Sep 17, 2026
Merged

kunitoki merged 14 commits into
mainfrom
dev/optimise_animations

Conversation

@kunitoki

@kunitoki kunitoki commented Sep 16, 2026

Copy link
Copy Markdown
Owner

This pull request includes a variety of improvements and fixes across the build pipeline, changelog documentation, graphics and animation systems, UI, and developer tooling. The most significant changes focus on enhancing timer and animation precision, optimizing rendering performance, and improving developer workflows for testing and building on multiple platforms.

Build and Tooling Updates

  • Updated the GitHub Actions workflow to use android-actions/setup-android@v4 for setting up the Android SDK, ensuring compatibility and access to the latest features. (.github/workflows/build_android.yml) [1] [2] [3]
  • Added separate Justfile recipes for running Debug and Release tests for WASM builds, improving clarity and flexibility for CI and local testing. (justfile)

Graphics and Animation System Improvements

  • Improved the WaitableTimer implementation for Apple, Linux, and Android to achieve more precise deadlines using cascaded absolute sleeps and a short busy-wait, reducing overshoot and timer slack. The fallback condition-variable wait is now only used on Windows and WebAssembly. (CHANGELOG.md)
  • Enhanced SVG and Lottie rendering performance by preparing text layout, gradients, image bounds, and caches during parsing, and by prewarming static geometry and paint caches for Lottie animations. (CHANGELOG.md)
  • Optimized AnimationRenderer to avoid unnecessary offscreen rendering for single-reference precompositions and certain layer types, improved mask and precomp caching, and made parent-transform resolution linear and memoized. (CHANGELOG.md)

UI and Rendering Behavior

  • Fixed animation repaint requests to ensure frames are only submitted at scheduled deadlines, preventing uncapped render loops and uneven frame pacing. Animation precomposition canvases are now managed with a bounded per-frame scratch pool to avoid unbounded GPU memory usage. (CHANGELOG.md)
  • Added a paint method to ConvolutionDemo and CrossoverDemo to draw a consistent background, and removed unnecessary setOpaque(false) calls for clarity. (examples/graphics/source/examples/ConvolutionDemo.h, CrossoverDemo.h) [1] [2] [3] [4]

Animation Parsing Optimizations

  • Updated Lottie shape parsing to eagerly build static paths for ellipses, rectangles, Bezier paths, and polystars when all properties are static, reducing per-frame work during playback. (modules/yup_animation/io/yup_LottieReader.cpp) [1] [2] [3] [4]

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.68551% with 98 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.42%. Comparing base (c3cf265) to head (a6f3073).

Files with missing lines Patch % Lines
...nimation/renderer/yup_AnimationRenderResources.cpp 44.92% 38 Missing ⚠️
...s/yup_animation/renderer/yup_AnimationRenderer.cpp 83.24% 31 Missing ⚠️
modules/yup_graphics/drawables/yup_Drawable.cpp 86.91% 25 Missing ⚠️
modules/yup_animation/model/yup_AnimationPaint.cpp 90.47% 2 Missing ⚠️
modules/yup_events/timers/yup_Timer.cpp 92.59% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   82.38%   82.42%   +0.03%     
==========================================
  Files         836      837       +1     
  Lines       89418    89656     +238     
==========================================
+ Hits        73666    73896     +230     
- Misses      15752    15760       +8     
Files with missing lines Coverage Δ
modules/yup_animation/io/yup_LottieReader.cpp 78.20% <100.00%> (+0.59%) ⬆️
modules/yup_animation/model/yup_AnimationLayer.h 71.42% <ø> (ø)
...ules/yup_animation/model/yup_AnimationModifier.cpp 88.63% <100.00%> (+1.45%) ⬆️
...odules/yup_animation/model/yup_AnimationModifier.h 22.72% <ø> (ø)
modules/yup_animation/model/yup_AnimationPaint.h 50.00% <ø> (ø)
..._animation/renderer/yup_AnimationRenderResources.h 75.00% <100.00%> (+8.33%) ⬆️
...les/yup_animation/renderer/yup_AnimationRenderer.h 100.00% <100.00%> (ø)
...dio_gui/displays/yup_SpectrumAnalyzerComponent.cpp 79.87% <100.00%> (ø)
modules/yup_core/threads/yup_WaitableTimer.cpp 100.00% <100.00%> (ø)
modules/yup_core/yup_core.cpp 100.00% <ø> (ø)
... and 11 more

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3cf265...a6f3073. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kunitoki
kunitoki merged commit 26ce344 into main Sep 17, 2026
41 checks passed
@kunitoki
kunitoki deleted the dev/optimise_animations branch September 17, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant