render: propagate errors
This commit is contained in:
parent
d9fa3f6732
commit
1b4492c670
14 changed files with 169 additions and 105 deletions
|
|
@ -525,8 +525,10 @@ impl GfxFramebuffer for VulkanImage {
|
|||
(self.width as _, self.height as _)
|
||||
}
|
||||
|
||||
fn render(&self, ops: Vec<GfxApiOpt>, clear: Option<&Color>) {
|
||||
self.renderer.execute(self, &ops, clear).unwrap();
|
||||
fn render(&self, ops: Vec<GfxApiOpt>, clear: Option<&Color>) -> Result<(), GfxError> {
|
||||
self.renderer
|
||||
.execute(self, &ops, clear)
|
||||
.map_err(|e| e.into())
|
||||
}
|
||||
|
||||
fn copy_to_shm(
|
||||
|
|
|
|||
|
|
@ -698,7 +698,9 @@ impl VulkanRenderer {
|
|||
&[],
|
||||
true,
|
||||
)?;
|
||||
(&*tmp_tex as &dyn GfxFramebuffer).copy_texture(&(tex.clone() as _), x, y);
|
||||
(&*tmp_tex as &dyn GfxFramebuffer)
|
||||
.copy_texture(&(tex.clone() as _), x, y)
|
||||
.map_err(VulkanError::GfxError)?;
|
||||
self.read_all_pixels(&tmp_tex, stride, dst)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue