space: make render error check more readable
This commit is contained in:
parent
26e1576f87
commit
d69d15630e
|
@ -498,7 +498,7 @@ impl Space {
|
||||||
}
|
}
|
||||||
|
|
||||||
let output_transform: Transform = output.current_transform().into();
|
let output_transform: Transform = output.current_transform().into();
|
||||||
if let Err(err) = renderer.render(
|
let res = renderer.render(
|
||||||
output_transform
|
output_transform
|
||||||
.transform_size(output_size)
|
.transform_size(output_size)
|
||||||
.to_f64()
|
.to_f64()
|
||||||
|
@ -559,7 +559,9 @@ impl Space {
|
||||||
|
|
||||||
Result::<(), R::Error>::Ok(())
|
Result::<(), R::Error>::Ok(())
|
||||||
},
|
},
|
||||||
) {
|
);
|
||||||
|
|
||||||
|
if let Err(err) = res {
|
||||||
// if the rendering errors on us, we need to be prepared, that this whole buffer was partially updated and thus now unusable.
|
// if the rendering errors on us, we need to be prepared, that this whole buffer was partially updated and thus now unusable.
|
||||||
// thus clean our old states before returning
|
// thus clean our old states before returning
|
||||||
state.old_damage = VecDeque::new();
|
state.old_damage = VecDeque::new();
|
||||||
|
|
Loading…
Reference in New Issue