wl_surface: handle alpha modes
This commit is contained in:
parent
37674a229c
commit
69ca5d92e7
10 changed files with 82 additions and 25 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue