1
0
Fork 0
forked from wry/wry

wl_surface: handle alpha modes

This commit is contained in:
Julian Orth 2026-02-21 14:24:38 +01:00
parent 37674a229c
commit 69ca5d92e7
10 changed files with 82 additions and 25 deletions

View file

@ -219,6 +219,7 @@ pub struct CopyTexture {
pub alpha: Option<f32>,
pub opaque: bool,
pub cd: Rc<ColorDescription>,
pub alpha_mode: AlphaMode,
}
#[derive(Clone, Debug, PartialEq)]
@ -443,6 +444,7 @@ impl dyn GfxFramebuffer {
release_sync,
false,
texture_cd,
AlphaMode::PremultipliedElectrical,
);
let clear = self.format().has_alpha.then_some(&Color::TRANSPARENT);
self.render(
@ -825,6 +827,10 @@ pub trait GfxContext: Debug {
false
}
fn supports_alpha_modes(&self) -> bool {
false
}
fn supports_invalid_modifier(&self) -> bool {
false
}