mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
lottie: fix precomposition with masking
Some checks failed
Android / build_x86_64 (push) Has been cancelled
Android / build_aarch64 (push) Has been cancelled
iOS / build_x86_64 (push) Has been cancelled
iOS / build_arm64 (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS / compact_test (push) Has been cancelled
macOS / unit_test (push) Has been cancelled
Ubuntu / build (push) Has been cancelled
Ubuntu / compact_test (push) Has been cancelled
Ubuntu / unit_test (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows / compact_test (push) Has been cancelled
Windows / unit_test (push) Has been cancelled
Some checks failed
Android / build_x86_64 (push) Has been cancelled
Android / build_aarch64 (push) Has been cancelled
iOS / build_x86_64 (push) Has been cancelled
iOS / build_arm64 (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS / compact_test (push) Has been cancelled
macOS / unit_test (push) Has been cancelled
Ubuntu / build (push) Has been cancelled
Ubuntu / compact_test (push) Has been cancelled
Ubuntu / unit_test (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows / compact_test (push) Has been cancelled
Windows / unit_test (push) Has been cancelled
A precomposition layer is clipped to its viewport. If the same layer also had a mask that was optimized using clipping, this clip was unintentionally overridden by the viewport clipping. This conflict is now fixed.
This commit is contained in:
parent
55847bdcb3
commit
211fee73e2
1 changed files with 2 additions and 2 deletions
|
@ -1174,8 +1174,8 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo)
|
||||||
{
|
{
|
||||||
if (layer->masks.count == 0) return;
|
if (layer->masks.count == 0) return;
|
||||||
|
|
||||||
//Introduce an intermediate scene for embracing the matte + masking
|
//Introduce an intermediate scene for embracing matte + masking or precomp clipping + masking replaced by clipping
|
||||||
if (layer->matteTarget) {
|
if (layer->matteTarget || layer->type == LottieLayer::Precomp) {
|
||||||
auto scene = Scene::gen();
|
auto scene = Scene::gen();
|
||||||
scene->push(layer->scene);
|
scene->push(layer->scene);
|
||||||
layer->scene = scene;
|
layer->scene = scene;
|
||||||
|
|
Loading…
Add table
Reference in a new issue