Add LOTTIE_RASTER_THREAD option. 58/294558/2 accepted/tizen/unified/20230628.023652
authorjoogab.yun <joogab.yun@samsung.com>
Wed, 21 Jun 2023 06:36:42 +0000 (15:36 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Wed, 21 Jun 2023 07:09:30 +0000 (16:09 +0900)
default value is false.
It does not use threads when rasterizing.

Change-Id: I0a1488b5bed575164249a41c2a40ff5f32fa0c25

CMakeLists.txt
cmake/config.h.in
meson.build
meson_options.txt
src/vector/vraster.cpp

index 38a986225bc8ddb853c79c2692dd61edcb7123ea..940a9e436e7a3596a9cc3571125e72dc24625934 100644 (file)
@@ -30,6 +30,7 @@ add_library(rlottie::rlottie ALIAS rlottie)
 
 option(LOTTIE_MODULE "Enable LOTTIE MODULE SUPPORT" ON)
 option(LOTTIE_THREAD "Enable LOTTIE THREAD SUPPORT" ON)
+option(LOTTIE_RASTER_THREAD "Enable LOTTIE RASTER THREAD SUPPORT" OFF)
 option(LOTTIE_CACHE "Enable LOTTIE CACHE SUPPORT" ON)
 option(LOTTIE_TEST "Build LOTTIE AUTOTESTS" OFF)
 option(LOTTIE_CCACHE "Enable LOTTIE ccache SUPPORT" OFF)
index ca42a9e1d407e08ba2256cdfb274d5a903fbe07a..e4c0c3edec0df996b56253f6e8c917739a071c24 100644 (file)
@@ -17,3 +17,9 @@
 #ifdef LOTTIE_CACHE
 #define LOTTIE_CACHE_SUPPORT
 #endif
+
+#cmakedefine LOTTIE_RASTER_THREAD
+
+#ifdef LOTTIE_RASTER_THREAD
+#define LOTTIE_RASTER_THREAD_SUPPORT
+#endif
index 50404c58679ab3142dac1c286020a00a39d02f5e..46b1ec4c864692504d49fd1c5b8362ff78c8fa02 100644 (file)
@@ -18,6 +18,10 @@ if get_option('thread') == true
     config_h.set10('LOTTIE_THREAD_SUPPORT', true)
 endif
 
+if get_option('raster_thread') == true
+  config_h.set10('LOTTIE_RASTER_THREAD_SUPPORT', true)
+endif
+
 if get_option('module') == true
     config_h.set10('LOTTIE_IMAGE_MODULE_SUPPORT', true)
 
@@ -116,6 +120,3 @@ Summary:
     )
 
 message(summary)
-
-
-
index c81dfbc4f4e92a5986943638013a9241cfd15344..acc79d218dabf40f4a29a2bf17bfae6142ece5f4 100644 (file)
@@ -3,6 +3,11 @@ option('thread',
    value: true,
    description: 'Enable threading in rlottie')
 
+option('raster_thread',
+   type: 'boolean',
+   value: false,
+   description: 'Enable raster threading in rlottie')
+
 option('cache',
    type: 'boolean',
    value: true,
@@ -41,6 +46,3 @@ option('cmake',
   type: 'boolean',
   value: false,
   description: 'Enable Generating  CMake config files')
-
-
-
index 8ef7b57132593d011a135ce2520efd06131f96bb..632fb6568ad5fa427ee96fdf43b083b129ca7d92 100644 (file)
@@ -415,7 +415,7 @@ struct VRleTask {
 
 using VTask = std::shared_ptr<VRleTask>;
 
-#ifdef LOTTIE_THREAD_SUPPORT
+#if defined(LOTTIE_THREAD_SUPPORT) && defined(LOTTIE_RASTER_THREAD_SUPPORT)
 
 #include <thread>
 #include "vtaskqueue.h"