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 committed by Hermet Park
parent 41c1171197
commit 2d47585c98

View file

@ -278,10 +278,10 @@ LoadModule* LoaderMgr::loader(const string& path, bool* invalid)
{
*invalid = false;
//TODO: lottie is not sharable.
//TODO: svg & lottie is not sharable.
auto allowCache = true;
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 (auto loader = _findFromCache(path)) return loader;