From 99a29ae97f5a2f517bf9df0b68cbc9d9e3bbcbb7 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 4 Apr 2024 11:38:19 +0900 Subject: [PATCH] lottie: removed unused code. Currently, thorvg has no plan to support dotlottie format. --- src/loaders/lottie/tvgLottieLoader.cpp | 22 ---------------------- src/renderer/tvgLoader.cpp | 1 - 2 files changed, 23 deletions(-) diff --git a/src/loaders/lottie/tvgLottieLoader.cpp b/src/loaders/lottie/tvgLottieLoader.cpp index 781e6e45..2f879285 100644 --- a/src/loaders/lottie/tvgLottieLoader.cpp +++ b/src/loaders/lottie/tvgLottieLoader.cpp @@ -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; diff --git a/src/renderer/tvgLoader.cpp b/src/renderer/tvgLoader.cpp index 661c5070..ddcf5c6e 100644 --- a/src/renderer/tvgLoader.cpp +++ b/src/renderer/tvgLoader.cpp @@ -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);