Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/backends/cg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,12 @@ impl<D: HasDisplayHandle, W: HasWindowHandle> SurfaceInterface<D, W> for CGImpl<
}

#[inline]
fn supports_alpha_mode(&self, _alpha_mode: AlphaMode) -> bool {
true
fn supports_alpha_mode(&self, alpha_mode: AlphaMode) -> bool {
// Premultiplied doesn't seem to work, at least not with transparent windows.
matches!(
alpha_mode,
AlphaMode::Ignored | AlphaMode::Opaque | AlphaMode::Postmultiplied
)
}

fn configure(
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,10 @@ pub enum AlphaMode {
/// ## Platform Dependent Behavior
///
/// - Wayland and DRM/KMS: Supported.
/// - macOS/iOS: Supported, but currently doesn't work with additive values (maybe only as the
/// root layer?). Will be fixed by <https://github.com/rust-windowing/softbuffer/pull/329>.
/// - Web: Not yet supported (TODO `ImageBitmap`).
/// - Android, Orbital, Windows and X11: Not supported (yet unknown if they can be, feel
/// free to open an issue about it).
/// - macOS/iOS: Not supported (doesn't seem to work with additive values).
#[doc(alias = "Associated")]
Premultiplied,
/// The non-alpha channels are not expected to already be multiplied by the alpha channel;
Expand Down
Loading