[skottie] Disable skottie_tool on iOS

No thread_local support.

Change-Id: I8f22b237e099f36992da3483e06ae22ba3cd6de0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243625
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
Florin Malita 2019-09-24 18:00:39 -04:00 committed by Skia Commit-Bot
parent 803f4c15d1
commit 01acb12110

View File

@ -226,12 +226,21 @@ int main(int argc, char** argv) {
SkTaskGroup::Enabler enabler(FLAGS_threads - 1);
SkTaskGroup{}.batch(frame_count, [&](int i) {
#if defined(SK_BUILD_FOR_IOS)
// iOS doesn't support thread_local on versions less than 9.0.
auto tl_sink = MakeSink(FLAGS_format[0]);
auto anim = skottie::Animation::Builder()
.setResourceProvider(rp)
.make(static_cast<const char*>(data->data()), data->size());
auto* tl_anim = anim.get();
#else
thread_local static auto* tl_sink = MakeSink(FLAGS_format[0]).release();
thread_local static auto* tl_anim =
skottie::Animation::Builder()
.setResourceProvider(rp)
.make(static_cast<const char*>(data->data()), data->size())
.release();
#endif
if (tl_sink && tl_anim) {
tl_anim->seek(t0 + dt * i);