lottie: Implement Set Matte(Matte3) effect#4300
Conversation
There was a problem hiding this comment.
Pull request overview
Adds initial support for the Lottie “Set Matte (Matte3)” layer effect to improve Lottie effects compliance (related to #4158), by parsing the effect and wiring it into the matte-building/rendering pipeline.
Changes:
- Introduce a new
LottieEffect::SetMattetype and model (LottieFxSetMatte) to store Matte3 properties. - Extend the Lottie parser to instantiate and parse the Set Matte effect.
- Update the builder to derive
matteTarget/matteTypefrom Set Matte and adjust matte updating behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/loaders/lottie/tvgLottieParser.h | Adds Set Matte parsing entry point declaration. |
| src/loaders/lottie/tvgLottieParser.cpp | Instantiates LottieFxSetMatte and parses Matte3 properties. |
| src/loaders/lottie/tvgLottieModel.h | Adds SetMatte effect type, LottieFxSetMatte struct, and a new layer flag. |
| src/loaders/lottie/tvgLottieBuilder.cpp | Hooks Set Matte into composition building and adjusts matte application logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bc12c80 to
58eda91
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a00fdaa to
9bd7217
Compare
ValidationTest file: lottie - 2026-04-07T060138.300.json is invalid. It could be uploaded again. 10624.json FPS on the examples: Lottie, LottieBigSize, LottieExpressions keeps consistency. I didn't find any observable issues during all examples execution. Thank you for the contribution. |
@wenjieshen It's very weird how size could be reduced with logic addition... |
|
Note, in my WASM comparison (main vs here), I got 524 bytes increased: -> +524 bytes (+0.057%) According to wasm-obj, the code section is the most increased part (+435B) |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary Size Report
|
Test file: lottie - 2026-04-07T060138.300.json
Also resolves:
see: https://lottiefiles.github.io/lottie-docs/effects/#matte3-effect
related: #4158
issue: #3115