Thanks to visit codestin.com
Credit goes to github.com

Skip to content

api: support lottie effect quality option #3795

@hermet

Description

@hermet

Somehow, quality and performance are a double-edged sword. Quality is very relative: some users are satisfied with lower quality, while others are not. It also depends on the animation or effects — in some cases, low quality can look quite good and may not differ much from high quality, while offering much faster performance. As a result, it’s a good idea to provide a quality option so that users can decide for themselves how to balance quality and performance.

Suggestion

We can introduce an API for the effect quality options.

Result LottieAnimation::quality(uint8_t value: 0 - 100);

This given quality value can be applied to the SceneEffect internally. At the moment, the current value is fixed with the medium level.

//tvgLottieBuilder.cpp (1314)
void LottieBuilder::updateEffect(LottieLayer* layer, float frameNo)
{
    constexpr int QUALITY = 35;  //current value is fixed as medium level(33 ~ 66).
    ...
}

Default value: 50

Metadata

Metadata

Assignees

Labels

APIsUpdate / Revise APIslottieLottie animation

Type

No type

Projects

Status

Done 1.0

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions