diff options
Diffstat (limited to 'rust/wasm/src')
| -rw-r--r-- | rust/wasm/src/compositor.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/rust/wasm/src/compositor.rs b/rust/wasm/src/compositor.rs index 7652b3f3..4d73e9ad 100644 --- a/rust/wasm/src/compositor.rs +++ b/rust/wasm/src/compositor.rs @@ -81,13 +81,11 @@ pub fn resize_compositor(width: u32, height: u32) -> Result<(), JsValue> { }; runtime.canvas.set_width(width); runtime.canvas.set_height(height); - if runtime.surface_size != (width, height) { - gpu_runtime - .context - .configure_surface(&runtime.surface, width, height) - .map_err(|error| JsValue::from_str(&error.to_string()))?; - runtime.surface_size = (width, height); - } + gpu_runtime + .context + .configure_surface(&runtime.surface, width, height) + .map_err(|error| JsValue::from_str(&error.to_string()))?; + runtime.surface_size = (width, height); Ok(()) }) }) |
