mirror of
https://github.com/penpot/penpot.git
synced 2025-07-14 08:47:16 +02:00
🐛 Fix asynchronous content rendering
This commit is contained in:
parent
d0425cabda
commit
d71fa659d5
12 changed files with 166 additions and 100 deletions
|
@ -220,14 +220,14 @@ impl RenderState {
|
|||
let tiles = tiles::TileHashMap::new();
|
||||
|
||||
RenderState {
|
||||
gpu_state,
|
||||
gpu_state: gpu_state.clone(),
|
||||
options: RenderOptions::default(),
|
||||
surfaces,
|
||||
fonts,
|
||||
viewbox,
|
||||
cached_viewbox: Viewbox::new(0., 0.),
|
||||
cached_target_snapshot: None,
|
||||
images: ImageStore::new(),
|
||||
images: ImageStore::new(gpu_state.context.clone()),
|
||||
background_color: skia::Color::TRANSPARENT,
|
||||
render_request_id: None,
|
||||
render_in_progress: false,
|
||||
|
@ -257,7 +257,7 @@ impl RenderState {
|
|||
}
|
||||
|
||||
pub fn add_image(&mut self, id: Uuid, image_data: &[u8]) -> Result<(), String> {
|
||||
self.images.add(id, image_data, &mut self.gpu_state.context)
|
||||
self.images.add(id, image_data)
|
||||
}
|
||||
|
||||
pub fn has_image(&mut self, id: &Uuid) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue