1
0
Fork 0
forked from wry/wry

wl_surface: track if surface is fully opaque

This commit is contained in:
Julian Orth 2025-02-24 09:45:11 +01:00
parent 6243278f5f
commit c796602aab
8 changed files with 59 additions and 5 deletions

View file

@ -192,6 +192,8 @@ pub struct CopyTexture {
pub acquire_sync: AcquireSync,
pub release_sync: ReleaseSync,
pub alpha: Option<f32>,
#[expect(dead_code)]
pub opaque: bool,
}
#[derive(Clone, Debug)]
@ -371,6 +373,7 @@ impl dyn GfxFramebuffer {
resv.cloned(),
acquire_sync,
release_sync,
false,
);
let clear = self.format().has_alpha.then_some(&Color::TRANSPARENT);
self.render(fb_acquire_sync, fb_release_sync, &ops, clear)