mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
lottie/builder: revert the clipper cache.
This ia a buggy, We will revisit this optimization with a perfect solution.
This commit is contained in:
parent
6f2bd5801c
commit
dd6956a7ac
3 changed files with 2 additions and 11 deletions
|
@ -817,12 +817,8 @@ static void _updatePrecomp(LottieLayer* precomp, float frameNo)
|
|||
|
||||
//clip the layer viewport
|
||||
if (precomp->w > 0 && precomp->h > 0) {
|
||||
if (!precomp->cache.clipper) {
|
||||
precomp->cache.clipper = Shape::gen().release();
|
||||
PP(precomp->cache.clipper)->ref();
|
||||
precomp->cache.clipper->appendRect(0, 0, static_cast<float>(precomp->w), static_cast<float>(precomp->h));
|
||||
}
|
||||
auto clipper = precomp->cache.clipper;
|
||||
auto clipper = Shape::gen().release();
|
||||
clipper->appendRect(0, 0, static_cast<float>(precomp->w), static_cast<float>(precomp->h));
|
||||
clipper->transform(precomp->cache.matrix);
|
||||
|
||||
//TODO: remove the intermediate scene....
|
||||
|
|
|
@ -156,8 +156,6 @@ LottieLayer::~LottieLayer()
|
|||
|
||||
delete(matte.target);
|
||||
delete(transform);
|
||||
|
||||
if (cache.clipper && PP(cache.clipper)->unref() == 0) delete(cache.clipper);
|
||||
}
|
||||
|
||||
void LottieLayer::prepare()
|
||||
|
|
|
@ -524,9 +524,6 @@ struct LottieLayer : LottieGroup
|
|||
float frameNo = -1.0f;
|
||||
Matrix matrix;
|
||||
uint8_t opacity;
|
||||
|
||||
//tvg render data
|
||||
tvg::Shape* clipper = nullptr;
|
||||
} cache;
|
||||
|
||||
Type type = Null;
|
||||
|
|
Loading…
Add table
Reference in a new issue