1
0
Fork 0
forked from wry/wry

vulkan: ignore paint region if framebuffer is undefined

This commit is contained in:
Julian Orth 2025-02-22 11:23:26 +01:00
parent 1d9bd404d6
commit 52624455b3
2 changed files with 13 additions and 7 deletions

View file

@ -283,6 +283,11 @@ pub trait GfxFramebuffer: Debug {
) -> Result<Option<SyncFile>, GfxError>;
fn format(&self) -> &'static Format;
fn full_region(&self) -> Region {
let (width, height) = self.physical_size();
Region::new2(Rect::new_sized_unchecked(0, 0, width, height))
}
}
pub trait GfxInternalFramebuffer: GfxFramebuffer {
@ -319,11 +324,6 @@ impl dyn GfxFramebuffer {
)
}
fn full_region(&self) -> Region {
let (width, height) = self.physical_size();
Region::new2(Rect::new_sized_unchecked(0, 0, width, height))
}
pub fn clear(
self: &Rc<Self>,
acquire_sync: AcquireSync,