New ImageResourceDisplay implementation that should decrease RAM usage

This commit is contained in:
Yousef Khadadeh 2026-02-19 15:21:47 +03:00
parent a69d9e3c6c
commit fec602e46a
11 changed files with 246 additions and 98 deletions

View file

@ -12,8 +12,8 @@ void SvgResourceDisplay::update(World& w) {
mustUpdateDraw = false;
}
bool SvgResourceDisplay::load(ResourceManager& rMan, const std::string& fileName, const std::string& fileData) {
SkMemoryStream strm(fileData.c_str(), fileData.size());
bool SvgResourceDisplay::load(ResourceManager& rMan, const std::string& fileName, const std::shared_ptr<std::string>& fileData) {
SkMemoryStream strm(fileData->c_str(), fileData->size());
svgDom = SkSVGDOM::Builder().make(strm);
mustUpdateDraw = true;