mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Improve big images performance
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled
Some checks failed
_DEVELOP / build-bundle (push) Has been cancelled
_DEVELOP / build-docker (push) Has been cancelled
_STAGING / build-bundle (push) Has been cancelled
_STAGING / build-docker (push) Has been cancelled
Commit Message Check / Check Commit Message (push) Has been cancelled
This commit is contained in:
committed by
Alonso Torres
parent
c850f101d3
commit
6ea69c94ee
@@ -318,12 +318,17 @@ impl RenderState {
|
||||
&mut self.fonts
|
||||
}
|
||||
|
||||
pub fn add_image(&mut self, id: Uuid, image_data: &[u8]) -> Result<(), String> {
|
||||
self.images.add(id, image_data)
|
||||
pub fn add_image(
|
||||
&mut self,
|
||||
id: Uuid,
|
||||
is_thumbnail: bool,
|
||||
image_data: &[u8],
|
||||
) -> Result<(), String> {
|
||||
self.images.add(id, is_thumbnail, image_data)
|
||||
}
|
||||
|
||||
pub fn has_image(&self, id: &Uuid) -> bool {
|
||||
self.images.contains(id)
|
||||
pub fn has_image(&self, id: &Uuid, is_thumbnail: bool) -> bool {
|
||||
self.images.contains(id, is_thumbnail)
|
||||
}
|
||||
|
||||
pub fn set_debug_flags(&mut self, debug: u32) {
|
||||
|
||||
Reference in New Issue
Block a user