From ec6e8a6e94b8670bd51e6e0419d9340e04be84d8 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Sun, 21 Jul 2024 17:42:17 +0900 Subject: [PATCH] wasm: thorvg canvas resize problem. The canvas syncs before changing a target buffer. issue: https://github.com/thorvg/thorvg/issues/2580 --- src/bindings/wasm/tvgWasmLottieAnimation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bindings/wasm/tvgWasmLottieAnimation.cpp b/src/bindings/wasm/tvgWasmLottieAnimation.cpp index 23e736cf..8942993b 100644 --- a/src/bindings/wasm/tvgWasmLottieAnimation.cpp +++ b/src/bindings/wasm/tvgWasmLottieAnimation.cpp @@ -179,6 +179,8 @@ public: if (!canvas || !animation) return; if (this->width == width && this->height == height) return; + canvas->sync(); + this->width = width; this->height = height;