From 6c8faad725b9ea3e9edd49b1ad5fb87197046d62 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. (cherry picked from commit 2e32b93165923e5f5ac87e5f1b3105f8d2a88509) --- 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 ef65b1500d89..468c58966d3c 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 e6d993a41e53..3b27e415a131 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 4f485d092156..59d1eca1f918 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