From 588bcf5264eaab33e6db3c28489aa62bcd4d510c Mon Sep 17 00:00:00 2001 From: Jinny You Date: Thu, 27 Mar 2025 15:28:12 +0900 Subject: [PATCH] wasm: fix build error when WebGPU is disabled (SW/GL only) Fixed a build error that occurred when the WebGPU feature was disabled due to a missing feature check condition. The issue affected building with the software and OpenGL only backends. issue: #3356 --- 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 66982c90..53bf684e 100644 --- a/src/bindings/wasm/tvgWasmLottieAnimation.cpp +++ b/src/bindings/wasm/tvgWasmLottieAnimation.cpp @@ -191,7 +191,9 @@ struct TvgWgEngine : TvgEngineMethod void resize(Canvas* canvas, int w, int h) override { + #ifdef THORVG_WG_RASTER_SUPPORT if (canvas) static_cast(canvas)->target(device, instance, surface, w, h, ColorSpace::ABGR8888S); + #endif } };