Fix huge memory allocation on unused emoji.
Before that change call to Instance::setColored started emoji loading and allocating memory for all animation frames even if it wasn't used.
This commit is contained in:
parent
2996fb7030
commit
03f8127875
1 changed files with 3 additions and 1 deletions
|
|
@ -706,7 +706,9 @@ bool Instance::ready() {
|
||||||
if (state.hasImagePreview()) {
|
if (state.hasImagePreview()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
load(state);
|
if (!_usage.empty()) {
|
||||||
|
load(state);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}, [](Caching &state) {
|
}, [](Caching &state) {
|
||||||
return state.renderer->canMakePreview();
|
return state.renderer->canMakePreview();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue