mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
fixup! feat(core): introduce new drawing library
This commit is contained in:
parent
49865f41cd
commit
f7562ac924
21
core/embed/rust/src/ui/shape/cache/zlib_cache.rs
vendored
21
core/embed/rust/src/ui/shape/cache/zlib_cache.rs
vendored
@ -144,15 +144,18 @@ impl<'a> ZlibCache<'a> {
|
||||
.iter_mut()
|
||||
.find(|slot| slot.is_for(zdata, offset));
|
||||
|
||||
if let Some(slot) = slot {
|
||||
slot.uncompress(dest_buf)
|
||||
} else {
|
||||
let selected = self.select_slot_for_reuse()?;
|
||||
let slot = &mut self.slots[selected];
|
||||
slot.reset(zdata);
|
||||
slot.skip(offset)?;
|
||||
slot.uncompress(dest_buf)
|
||||
}
|
||||
let slot = match slot {
|
||||
Some(slot) => slot,
|
||||
None => {
|
||||
let selected = self.select_slot_for_reuse()?;
|
||||
let slot = &mut self.slots[selected];
|
||||
slot.reset(zdata);
|
||||
slot.skip(offset)?;
|
||||
slot
|
||||
}
|
||||
};
|
||||
|
||||
slot.uncompress(dest_buf)
|
||||
}
|
||||
|
||||
pub fn uncompress_toif(
|
||||
|
Loading…
Reference in New Issue
Block a user