pub enum SurfaceAlphaRequest {
Opaque,
TranslucentPreferred,
}Expand description
What a caller wants of the surface’s alpha, expressed without naming a
wgpu type — the public, platform-independent request a shell makes.
This is a request, not an outcome. A TranslucentPreferred surface on a
platform that advertises no translucent composite mode silently resolves
opaque; read ConfiguredSurface::resolved_translucent after configuration
rather than keying a paint contract off the request, or a hole-punched view
presents black rectangles on an opaque swapchain.
Variants§
Opaque
An ordinary opaque window: wgpu::CompositeAlphaMode::Auto, whatever the
surface reports.
TranslucentPreferred
Prefer a translucent alpha-compositing mode, so content behind the surface shows through where the frame’s alpha is below 1 — the mode a hole-punched native view underneath the frame needs.
Trait Implementations§
Source§impl Clone for SurfaceAlphaRequest
impl Clone for SurfaceAlphaRequest
Source§fn clone(&self) -> SurfaceAlphaRequest
fn clone(&self) -> SurfaceAlphaRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SurfaceAlphaRequest
Source§impl Debug for SurfaceAlphaRequest
impl Debug for SurfaceAlphaRequest
impl Eq for SurfaceAlphaRequest
Source§impl PartialEq for SurfaceAlphaRequest
impl PartialEq for SurfaceAlphaRequest
impl StructuralPartialEq for SurfaceAlphaRequest
Auto Trait Implementations§
impl Freeze for SurfaceAlphaRequest
impl RefUnwindSafe for SurfaceAlphaRequest
impl Send for SurfaceAlphaRequest
impl Sync for SurfaceAlphaRequest
impl Unpin for SurfaceAlphaRequest
impl UnsafeUnpin for SurfaceAlphaRequest
impl UnwindSafe for SurfaceAlphaRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.