From cebc29c5ff50afdd234db59ec58405cfe40e0f91 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 22 Oct 2024 14:12:19 +0900 Subject: [PATCH] renderer: hotfix a broken svg file sharing Do not allow data sharing among same svg instances. This should be addressed properly. --- src/renderer/tvgLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/tvgLoader.cpp b/src/renderer/tvgLoader.cpp index cd501929..4cc0e82e 100644 --- a/src/renderer/tvgLoader.cpp +++ b/src/renderer/tvgLoader.cpp @@ -294,10 +294,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;