From: joogab.yun Date: Wed, 21 Jun 2023 06:36:42 +0000 (+0900) Subject: Add LOTTIE_RASTER_THREAD option. X-Git-Tag: accepted/tizen/unified/20230628.023652^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91e706bee9d86aa97aea87c576a12d620820748c;p=platform%2Fcore%2Fuifw%2Flottie-player.git Add LOTTIE_RASTER_THREAD option. default value is false. It does not use threads when rasterizing. Change-Id: I0a1488b5bed575164249a41c2a40ff5f32fa0c25 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 38a9862..940a9e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/config.h.in b/cmake/config.h.in index ca42a9e..e4c0c3e 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -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 diff --git a/meson.build b/meson.build index 50404c5..46b1ec4 100644 --- a/meson.build +++ b/meson.build @@ -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) - - - diff --git a/meson_options.txt b/meson_options.txt index c81dfbc..acc79d2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') - - - diff --git a/src/vector/vraster.cpp b/src/vector/vraster.cpp index 8ef7b57..632fb65 100644 --- a/src/vector/vraster.cpp +++ b/src/vector/vraster.cpp @@ -415,7 +415,7 @@ struct VRleTask { using VTask = std::shared_ptr; -#ifdef LOTTIE_THREAD_SUPPORT +#if defined(LOTTIE_THREAD_SUPPORT) && defined(LOTTIE_RASTER_THREAD_SUPPORT) #include #include "vtaskqueue.h"