reverse if

This commit is contained in:
Emil Ernerfeldt 2022-11-16 17:46:20 +01:00
parent b629108eb9
commit 5407c6b7ed

View file

@ -147,7 +147,9 @@ impl WebPainter for WebPainterWgpu {
// Resize surface if needed // Resize surface if needed
let is_zero_sized_surface = size_in_pixels[0] == 0 || size_in_pixels[1] == 0; let is_zero_sized_surface = size_in_pixels[0] == 0 || size_in_pixels[1] == 0;
let frame = if !is_zero_sized_surface { let frame = if is_zero_sized_surface {
None
} else {
if size_in_pixels[0] != self.surface_configuration.width if size_in_pixels[0] != self.surface_configuration.width
|| size_in_pixels[1] != self.surface_configuration.height || size_in_pixels[1] != self.surface_configuration.height
{ {
@ -199,8 +201,6 @@ impl WebPainter for WebPainterWgpu {
} }
Some(frame) Some(frame)
} else {
None
}; };
{ {