pub struct ExternalBackdrop<'a> {
pub image: &'a Image,
pub scale: f32,
pub blurred: bool,
pub raw_image: Option<&'a Image>,
}Expand description
A backdrop image handed to BackgroundBlur layers that render into isolated
buffers (e.g. KMS planes) and therefore can’t see the content behind them.
image: composite of the planes below, a uniformly scaled copy of the whole scene (seescale).scale: the image’s resolution relative to the scene (1.0 = full res, 0.25 = quarter). The layer’s global region is sampled at this scale.blurred: the caller already blurredimage. The consumer then seeds it directly and SKIPS its own blur pass — blurring within the layer’s clipped shape samples transparent pixels at the edge and leaves a faded rim that re-exposes the raw seed. Blurring the whole image once avoids that.raw_image: the unblurred composite of the planes below, at the samescale. A layer withblur_include_contentset seeds THIS instead of the pre-blurredimageand runs the real blur, so same-plane content painted earlier in the pass (e.g. a popup underneath this one) is blurred into the result — the pre-blurredimagecan’t include it.None(the default) leaves such layers on the pre-blurred fast path.
Fields§
§image: &'a Image§scale: f32§blurred: bool§raw_image: Option<&'a Image>Trait Implementations§
Source§impl<'a> Clone for ExternalBackdrop<'a>
impl<'a> Clone for ExternalBackdrop<'a>
Source§fn clone(&self) -> ExternalBackdrop<'a>
fn clone(&self) -> ExternalBackdrop<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ExternalBackdrop<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExternalBackdrop<'a>
impl<'a> !RefUnwindSafe for ExternalBackdrop<'a>
impl<'a> Send for ExternalBackdrop<'a>
impl<'a> Sync for ExternalBackdrop<'a>
impl<'a> Unpin for ExternalBackdrop<'a>
impl<'a> !UnwindSafe for ExternalBackdrop<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more