mirror of
https://github.com/penpot/penpot.git
synced 2025-04-30 20:56:20 +02:00
🐛 Fix wasm render performance flushing drawing surface (#5709)
This commit is contained in:
parent
58c6bbcc0b
commit
16ec8b033a
1 changed files with 5 additions and 1 deletions
|
@ -138,7 +138,7 @@ impl RenderState {
|
|||
pub fn flush(&mut self) {
|
||||
self.gpu_state
|
||||
.context
|
||||
.flush_and_submit_surface(&mut self.final_surface, None)
|
||||
.flush_and_submit_surface(&mut self.final_surface, None);
|
||||
}
|
||||
|
||||
pub fn translate(&mut self, dx: f32, dy: f32) {
|
||||
|
@ -169,6 +169,10 @@ impl RenderState {
|
|||
}
|
||||
|
||||
pub fn apply_drawing_to_final_canvas(&mut self) {
|
||||
self.gpu_state
|
||||
.context
|
||||
.flush_and_submit_surface(&mut self.drawing_surface, None);
|
||||
|
||||
self.drawing_surface.draw(
|
||||
&mut self.final_surface.canvas(),
|
||||
(0.0, 0.0),
|
||||
|
|
Loading…
Add table
Reference in a new issue