updated travis to check this setup.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true meson -Dtest=true builddir && ninja -C builddir test && ninja -C builddir install"; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true meson -Dtest=true -Dcache=false -Dmodule=false -Ddumptree=true builddir && ninja -C builddir test && ninja -C builddir install"; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true meson -Dcache=false -Dmodule=false -Ddumptree=true builddir && ninja -C builddir install"; fi
+ - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true meson -Dthread=false builddir && ninja -C builddir install"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true cmake -DLOTTIE_TEST=ON -Bbuilddir -H. && make -C builddir -j$(nproc) all test && make -C builddir install"; fi
if get_option('thread') == true
config_h.set10('LOTTIE_THREAD_SUPPORT', true)
-else
- config_h.set('thread_local', true)
endif
if get_option('module') == true
}
}
-static thread_local std::vector<float> Dash_Vector;
+static vthread_local std::vector<float> Dash_Vector;
bool renderer::Stroke::updateContent(int frameNo, const VMatrix &matrix,
float alpha)
subdir('lottie')
subdir('binding')
-rlottie_lib_dep = [ vector_dep, lottie_dep, binding_dep, dependency('threads')]
+rlottie_lib_dep = [ vector_dep, lottie_dep, binding_dep]
+
+if get_option('thread') == true
+ rlottie_lib_dep += dependency('threads')
+endif
rlottie_lib = library('rlottie',
include_directories : inc,
-/*
+/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd. All rights reserved.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#define VECTOR_FALLTHROUGH
#endif
+#ifdef LOTTIE_THREAD_SUPPORT
+#define vthread_local thread_local
+#else
+#define vthread_local
+#endif
+
template <typename T>
V_CONSTEXPR inline const T &vMin(const T &a, const T &b)
{
* this function is thread safe as it uses thread_local variable
* which is unique per thread.
*/
-static thread_local VRle::VRleData Scratch_Object;
+static vthread_local VRle::VRleData Scratch_Object;
void VRle::operator&=(const VRle &o)
{