Bläddra i källkod

thorvg: Re-enable thread support, made opt-in upstream

Fixes #87788.
Fixes #87962.

(cherry picked from commit 2e32b93165923e5f5ac87e5f1b3105f8d2a88509)
Rémi Verschelde 1 år sedan
förälder
incheckning
6c8faad725

+ 1 - 0
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

+ 3 - 3
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()

+ 1 - 0
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