From 2e32b93165923e5f5ac87e5f1b3105f8d2a88509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 7 Feb 2024 12:02:57 +0100 Subject: [PATCH] thorvg: Re-enable thread support, made opt-in upstream Fixes #87788. Fixes #87962. --- thirdparty/thorvg/inc/config.h | 1 + thirdparty/thorvg/src/common/tvgLock.h | 6 +++--- thirdparty/thorvg/update-thorvg.sh | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/thirdparty/thorvg/inc/config.h b/thirdparty/thorvg/inc/config.h index e50971e2979..05b0275e664 100644 --- a/thirdparty/thorvg/inc/config.h +++ b/thirdparty/thorvg/inc/config.h @@ -5,6 +5,7 @@ #define THORVG_SVG_LOADER_SUPPORT #define THORVG_PNG_LOADER_SUPPORT #define THORVG_JPG_LOADER_SUPPORT +#define THORVG_THREAD_SUPPORT // For internal debugging: //#define THORVG_LOG_ENABLED diff --git a/thirdparty/thorvg/src/common/tvgLock.h b/thirdparty/thorvg/src/common/tvgLock.h index e6d993a41e5..3b27e415a13 100644 --- a/thirdparty/thorvg/src/common/tvgLock.h +++ b/thirdparty/thorvg/src/common/tvgLock.h @@ -38,10 +38,10 @@ namespace tvg { { Key* key = nullptr; - ScopedLock(Key& key) + ScopedLock(Key& p_key) { - key.mtx.lock(); - this->key = &key; + p_key.mtx.lock(); + key = &p_key; } ~ScopedLock() diff --git a/thirdparty/thorvg/update-thorvg.sh b/thirdparty/thorvg/update-thorvg.sh index be82de797d8..e2c84e58b5a 100755 --- a/thirdparty/thorvg/update-thorvg.sh +++ b/thirdparty/thorvg/update-thorvg.sh @@ -38,6 +38,7 @@ cat << EOF > ../inc/config.h #define THORVG_SVG_LOADER_SUPPORT #define THORVG_PNG_LOADER_SUPPORT #define THORVG_JPG_LOADER_SUPPORT +#define THORVG_THREAD_SUPPORT // For internal debugging: //#define THORVG_LOG_ENABLED