diff --git a/src/backends/cg.rs b/src/backends/cg.rs index 29879b70..477e67cb 100644 --- a/src/backends/cg.rs +++ b/src/backends/cg.rs @@ -284,8 +284,12 @@ impl SurfaceInterface 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( diff --git a/src/lib.rs b/src/lib.rs index 69b4e0e6..06acf64f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 . /// - 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;