From 5ae556cf13a31485f3bcba3b4aae8d78be9828c2 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 cdf90b4a..396a25ca 100644 --- a/src/bindings/wasm/tvgWasmLottieAnimation.cpp +++ b/src/bindings/wasm/tvgWasmLottieAnimation.cpp @@ -181,6 +181,8 @@ public: if (!canvas || !animation) return; if (this->width == width && this->height == height) return; + canvas->sync(); + this->width = width; this->height = height;