rlottie: update to 0.0.20200110
This commit is contained in:
parent
78d3d93e92
commit
f69aaf51a5
2 changed files with 26 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
From ce015e298fe78035ed9118381079902fc5843229 Mon Sep 17 00:00:00 2001
|
||||
From fe6f0d8ea6adf907e9bf58d95b3a5336d01e0c76 Mon Sep 17 00:00:00 2001
|
||||
From: John Preston <johnprestonmail@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 15:18:26 +0100
|
||||
Date: Sat, 18 Jan 2020 16:19:58 +0100
|
||||
Subject: [PATCH] Allow passing a color replacement map.
|
||||
|
||||
---
|
||||
|
@ -13,10 +13,10 @@ Subject: [PATCH] Allow passing a color replacement map.
|
|||
6 files changed, 59 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git inc/rlottie.h inc/rlottie.h
|
||||
index 6066c62..1436539 100644
|
||||
index b37f67a..961e25f 100644
|
||||
--- inc/rlottie.h
|
||||
+++ inc/rlottie.h
|
||||
@@ -291,7 +291,9 @@ class LOT_EXPORT Animation {
|
||||
@@ -299,7 +299,9 @@ public:
|
||||
*/
|
||||
static std::unique_ptr<Animation>
|
||||
loadFromData(std::string jsonData, const std::string &key,
|
||||
|
@ -28,10 +28,10 @@ index 6066c62..1436539 100644
|
|||
/**
|
||||
* @brief Returns default framerate of the Lottie resource.
|
||||
diff --git src/lottie/lottieanimation.cpp src/lottie/lottieanimation.cpp
|
||||
index be4d93e..58d1b13 100644
|
||||
index ef93930..dd45f2c 100644
|
||||
--- src/lottie/lottieanimation.cpp
|
||||
+++ src/lottie/lottieanimation.cpp
|
||||
@@ -240,7 +240,9 @@ std::future<Surface> AnimationImpl::renderAsync(size_t frameNo,
|
||||
@@ -248,7 +248,9 @@ std::future<Surface> AnimationImpl::renderAsync(size_t frameNo,
|
||||
*/
|
||||
std::unique_ptr<Animation> Animation::loadFromData(
|
||||
std::string jsonData, const std::string &key,
|
||||
|
@ -42,7 +42,7 @@ index be4d93e..58d1b13 100644
|
|||
{
|
||||
if (jsonData.empty()) {
|
||||
vWarning << "jason data is empty";
|
||||
@@ -249,7 +251,8 @@ std::unique_ptr<Animation> Animation::loadFromData(
|
||||
@@ -257,7 +259,8 @@ std::unique_ptr<Animation> Animation::loadFromData(
|
||||
|
||||
LottieLoader loader;
|
||||
if (loader.loadFromData(std::move(jsonData), key,
|
||||
|
@ -91,7 +91,7 @@ index 4d4646d..711d0d6 100644
|
|||
|
||||
class LOTModel;
|
||||
class LottieLoader
|
||||
@@ -29,7 +30,9 @@ class LottieLoader
|
||||
@@ -29,7 +30,9 @@ public:
|
||||
static void configureModelCacheSize(size_t cacheSize);
|
||||
bool load(const std::string &filePath, bool cachePolicy);
|
||||
bool loadFromData(std::string &&jsonData, const std::string &key,
|
||||
|
@ -102,11 +102,11 @@ index 4d4646d..711d0d6 100644
|
|||
std::shared_ptr<LOTModel> model();
|
||||
private:
|
||||
std::shared_ptr<LOTModel> mModel;
|
||||
diff --git a/src/lottie/lottieparser.cpp b/src/lottie/lottieparser.cpp
|
||||
index 19d6467..91fea5e 100644
|
||||
diff --git src/lottie/lottieparser.cpp src/lottie/lottieparser.cpp
|
||||
index 945cfde..bfdf494 100644
|
||||
--- src/lottie/lottieparser.cpp
|
||||
+++ src/lottie/lottieparser.cpp
|
||||
@@ -169,8 +169,14 @@ class LookaheadParserHandler {
|
||||
@@ -169,8 +169,14 @@ protected:
|
||||
|
||||
class LottieParserImpl : public LookaheadParserHandler {
|
||||
public:
|
||||
|
@ -123,8 +123,8 @@ index 19d6467..91fea5e 100644
|
|||
bool VerifyType();
|
||||
bool ParseNext();
|
||||
public:
|
||||
@@ -257,10 +263,13 @@ class LottieParserImpl : public LookaheadParserHandler {
|
||||
std::shared_ptr<VInterpolator> interpolator(VPointF, VPointF, std::string);
|
||||
@@ -260,10 +266,13 @@ public:
|
||||
VInterpolator* interpolator(VPointF, VPointF, std::string);
|
||||
|
||||
LottieColor toColor(const char *str);
|
||||
+ LottieColor applyReplacements(const LottieColor &color);
|
||||
|
@ -134,10 +134,10 @@ index 19d6467..91fea5e 100644
|
|||
protected:
|
||||
+ const std::vector<std::pair<std::uint32_t, std::uint32_t>>
|
||||
+ &mColorReplacements;
|
||||
std::unordered_map<std::string, std::shared_ptr<VInterpolator>>
|
||||
std::unordered_map<std::string, VInterpolator*>
|
||||
mInterpolatorCache;
|
||||
std::shared_ptr<LOTCompositionData> mComposition;
|
||||
@@ -789,6 +798,27 @@ LottieColor LottieParserImpl::toColor(const char *str)
|
||||
@@ -831,6 +840,27 @@ LottieColor LottieParserImpl::toColor(const char *str)
|
||||
tmp[1] = str[6];
|
||||
color.b = std::strtol(tmp, nullptr, 16) / 255.0f;
|
||||
|
||||
|
@ -165,9 +165,9 @@ index 19d6467..91fea5e 100644
|
|||
return color;
|
||||
}
|
||||
|
||||
@@ -1746,9 +1776,7 @@ void LottieParserImpl::getValue(LottieColor &color)
|
||||
while (NextArrayValue()) {
|
||||
val[i++] = GetDouble();
|
||||
@@ -1774,9 +1804,7 @@ void LottieParserImpl::getValue(LottieColor &color)
|
||||
val[i++] = value;
|
||||
}
|
||||
}
|
||||
- color.r = val[0];
|
||||
- color.g = val[1];
|
||||
|
@ -176,7 +176,7 @@ index 19d6467..91fea5e 100644
|
|||
}
|
||||
|
||||
void LottieParserImpl::getValue(LottieGradient &grad)
|
||||
@@ -2254,8 +2282,11 @@ class LOTDataInspector {
|
||||
@@ -2296,8 +2324,11 @@ public:
|
||||
#endif
|
||||
|
||||
LottieParser::~LottieParser() = default;
|
||||
|
@ -205,3 +205,6 @@ index 35a8417..06165f9 100644
|
|||
std::shared_ptr<LOTModel> model();
|
||||
private:
|
||||
std::unique_ptr<LottieParserImpl> d;
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Template file for 'rlottie'
|
||||
pkgname=rlottie
|
||||
_commit=71dfd5c3ba206cad9d73e3c249dd7d22f4f65b98
|
||||
version=0.0.20191002
|
||||
revision=2
|
||||
_commit=f6fc61f214945ac9961ba49fdfc9a3d3336e999b
|
||||
version=0.0.20200110
|
||||
revision=1
|
||||
wrksrc="rlottie-${_commit}"
|
||||
build_style=cmake
|
||||
configure_args="-DLOTTIE_CACHE=OFF"
|
||||
|
@ -11,7 +11,7 @@ maintainer="John <johnz@posteo.net>"
|
|||
license="LGPL-2.1-or-later, FTL, MIT, JSON, BSD-3-Clause"
|
||||
homepage="https://github.com/Samsung/rlottie"
|
||||
distfiles="https://github.com/Samsung/rlottie/archive/${_commit}.tar.gz"
|
||||
checksum=df064c381ade4fce143e5d7ee27771bbf7bc2218ac7a32afe3f49036ddcba422
|
||||
checksum=399bb06d8d2120f794eff8bc3e4cbbee13b9f22abcfd9f3f746f595d43ea0b42
|
||||
|
||||
post_patch() {
|
||||
vsed -e 's/c++14/c++17/g' -i CMakeLists.txt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue