Skip to content

Commit

Permalink
fix: thorvg canvas resize problem. (#206)
Browse files Browse the repository at this point in the history
The canvas syncs before changing a target buffer.

thorvg/thorvg#2580

Co-authored-by: Abdelrahman Ashraf <[email protected]>
  • Loading branch information
hermet and theashraf authored Aug 12, 2024
1 parent 5fa7fde commit e10c5c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dotlottie-rs/src/lottie_renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ impl LottieRenderer {
self.buffer
.resize((self.width * self.height * 4) as usize, 0);

self.thorvg_canvas.sync()?;

self.thorvg_canvas
.set_target(
&mut self.buffer,
Expand Down

0 comments on commit e10c5c0

Please sign in to comment.