lottie: removed unused code.

Currently, thorvg has no plan to support dotlottie format.
This commit is contained in:
Hermet Park 2024-04-04 11:38:19 +09:00 committed by Hermet Park
parent b0280150db
commit 99a29ae97f
2 changed files with 0 additions and 23 deletions

View file

@ -30,14 +30,6 @@
/* Internal Class Implementation */ /* 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) static float _str2float(const char* str, int len)
{ {
auto tmp = strDuplicate(str, 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) 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) { if (copy) {
content = (char*)malloc(size); content = (char*)malloc(size);
if (!content) return false; if (!content) return false;
@ -245,13 +230,6 @@ bool LottieLoader::open(const string& path)
fclose(f); 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->dirName = strDirname(path.c_str());
this->content = content; this->content = content;
this->copy = true; this->copy = true;

View file

@ -178,7 +178,6 @@ static LoadModule* _findByPath(const string& path)
if (!ext.compare("tvg")) return _find(FileType::Tvg); if (!ext.compare("tvg")) return _find(FileType::Tvg);
if (!ext.compare("svg")) return _find(FileType::Svg); if (!ext.compare("svg")) return _find(FileType::Svg);
if (!ext.compare("json")) return _find(FileType::Lottie); 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("png")) return _find(FileType::Png);
if (!ext.compare("jpg")) return _find(FileType::Jpg); if (!ext.compare("jpg")) return _find(FileType::Jpg);
if (!ext.compare("webp")) return _find(FileType::Webp); if (!ext.compare("webp")) return _find(FileType::Webp);