mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-04 13:52:35 +00:00
fixup! feat(core): introduce new drawing library
This commit is contained in:
parent
572de49dc2
commit
a2eb05d4c4
@ -115,7 +115,10 @@ impl<'a> JpegCacheSlot<'a> {
|
||||
}
|
||||
|
||||
fn is_for<'i: 'a>(&self, jpeg: &'i [u8], scale: u8) -> bool {
|
||||
jpeg == self.jpeg && scale == self.scale && self.decoder.is_some()
|
||||
jpeg.as_ptr() == self.jpeg.as_ptr()
|
||||
&& jpeg.len() == self.jpeg.len()
|
||||
&& scale == self.scale
|
||||
&& self.decoder.is_some()
|
||||
}
|
||||
|
||||
pub fn get_size<'i: 'a>(&mut self, jpeg: &'i [u8], scale: u8) -> Result<Offset, tjpgd::Error> {
|
||||
|
@ -92,7 +92,9 @@ impl<'a> ZlibCacheSlot<'a> {
|
||||
}
|
||||
|
||||
fn is_for(&self, zdata: &[u8], offset: usize) -> bool {
|
||||
self.zdata == zdata && self.offset == offset
|
||||
self.zdata.as_ptr() == zdata.as_ptr()
|
||||
&& self.zdata.len() == zdata.len()
|
||||
&& self.offset == offset
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user