mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
lottie: removed unused code.
Currently, thorvg has no plan to support dotlottie format.
This commit is contained in:
parent
b0280150db
commit
99a29ae97f
2 changed files with 0 additions and 23 deletions
|
@ -30,14 +30,6 @@
|
|||
/* Internal Class Implementation */
|
||||
/************************************************************************/
|
||||
|
||||
static bool _checkDotLottie(const char *str)
|
||||
{
|
||||
//check the .Lottie signature.
|
||||
if (str[0] == 0x50 && str[1] == 0x4B && str[2] == 0x03 && str[3] == 0x04) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
|
||||
static float _str2float(const char* str, int len)
|
||||
{
|
||||
auto tmp = strDuplicate(str, len);
|
||||
|
@ -197,13 +189,6 @@ bool LottieLoader::header()
|
|||
|
||||
bool LottieLoader::open(const char* data, uint32_t size, const std::string& rpath, bool copy)
|
||||
{
|
||||
//If the format is dotLottie
|
||||
auto dotLottie = _checkDotLottie(data);
|
||||
if (dotLottie) {
|
||||
TVGLOG("LOTTIE", "Requested .Lottie Format, Not Supported yet.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (copy) {
|
||||
content = (char*)malloc(size);
|
||||
if (!content) return false;
|
||||
|
@ -245,13 +230,6 @@ bool LottieLoader::open(const string& path)
|
|||
|
||||
fclose(f);
|
||||
|
||||
//If the format is dotLottie
|
||||
auto dotLottie = _checkDotLottie(content);
|
||||
if (dotLottie) {
|
||||
TVGLOG("LOTTIE", "Requested .Lottie Format, Not Supported yet.");
|
||||
return false;
|
||||
}
|
||||
|
||||
this->dirName = strDirname(path.c_str());
|
||||
this->content = content;
|
||||
this->copy = true;
|
||||
|
|
|
@ -178,7 +178,6 @@ static LoadModule* _findByPath(const string& path)
|
|||
if (!ext.compare("tvg")) return _find(FileType::Tvg);
|
||||
if (!ext.compare("svg")) return _find(FileType::Svg);
|
||||
if (!ext.compare("json")) return _find(FileType::Lottie);
|
||||
if (!ext.compare("lottie")) return _find(FileType::Lottie);
|
||||
if (!ext.compare("png")) return _find(FileType::Png);
|
||||
if (!ext.compare("jpg")) return _find(FileType::Jpg);
|
||||
if (!ext.compare("webp")) return _find(FileType::Webp);
|
||||
|
|
Loading…
Add table
Reference in a new issue