space: Return new damage on render

This commit is contained in:
Victor Brekenfeld 2021-12-29 15:56:00 +01:00
parent 7ae79fcba5
commit ab21df1943
1 changed files with 4 additions and 4 deletions

View File

@ -411,7 +411,7 @@ impl Space {
custom_elements: &[Box< custom_elements: &[Box<
dyn RenderElement<R, <R as Renderer>::Frame, <R as Renderer>::Error, <R as Renderer>::TextureId>, dyn RenderElement<R, <R as Renderer>::Frame, <R as Renderer>::Error, <R as Renderer>::TextureId>,
>], >],
) -> Result<bool, RenderError<R>> ) -> Result<Option<Vec<Rectangle<i32, Logical>>>, RenderError<R>>
where where
R: Renderer + ImportAll + 'static, R: Renderer + ImportAll + 'static,
R::TextureId: 'static, R::TextureId: 'static,
@ -520,7 +520,7 @@ impl Space {
}); });
if damage.is_empty() { if damage.is_empty() {
return Ok(false); return Ok(None);
} }
let output_transform: Transform = output.current_transform().into(); let output_transform: Transform = output.current_transform().into();
@ -605,9 +605,9 @@ impl Space {
(ToplevelId::from(elem), geo) (ToplevelId::from(elem), geo)
}) })
.collect(); .collect();
state.old_damage.push_front(new_damage); state.old_damage.push_front(new_damage.clone());
Ok(true) Ok(Some(new_damage))
} }
pub fn send_frames(&self, all: bool, time: u32) { pub fn send_frames(&self, all: bool, time: u32) {