Skip to content

Commit

Permalink
binding: update canvas API usage from clear() to remove()
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyjin committed Dec 13, 2024
1 parent 431131d commit 7326cab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tvgFlutterLottieAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class __attribute__((visibility("default"))) TvgLottieAnimation
return false;
}

canvas->clear(true);
canvas->remove();

animation = Animation::gen();

Expand Down Expand Up @@ -69,8 +69,6 @@ class __attribute__((visibility("default"))) TvgLottieAnimation

errorMsg = NoError;

canvas->clear(false);

if (canvas->update() != Result::Success)
{
errorMsg = "update() fail";
Expand All @@ -90,7 +88,7 @@ class __attribute__((visibility("default"))) TvgLottieAnimation
if (!updated)
return buffer;

if (canvas->draw() != Result::Success)
if (canvas->draw(true) != Result::Success)
{
errorMsg = "draw() fail";
return nullptr;
Expand Down

0 comments on commit 7326cab

Please sign in to comment.