renderer: hotfix a broken svg file sharing

Do not allow data sharing among same svg instances.
This should be addressed properly.
This commit is contained in:
Hermet Park 2024-10-22 14:12:19 +09:00
parent 4d8c0e9a64
commit cebc29c5ff

View file

@ -294,10 +294,10 @@ LoadModule* LoaderMgr::loader(const string& path, bool* invalid)
{ {
*invalid = false; *invalid = false;
//TODO: lottie is not sharable. //TODO: svg & lottie is not sharable.
auto allowCache = true; auto allowCache = true;
auto ext = path.substr(path.find_last_of(".") + 1); auto ext = path.substr(path.find_last_of(".") + 1);
if (!ext.compare("json")) allowCache = false; if (!ext.compare("svg") || !ext.compare("json")) allowCache = false;
if (allowCache) { if (allowCache) {
if (auto loader = _findFromCache(path)) return loader; if (auto loader = _findFromCache(path)) return loader;