pub enum TargetLoadOp {
Load,
Clear(Color),
}Expand description
How the UI recorder treats colors already present in the host target.
Neither policy submits GPU work. It takes effect when the host submits the
encoder. Use Load after host drawing; use Clear for standalone UI or to
intentionally replace the host background. The policy covers the full target,
independently of layer clips and whether the layer list is empty.
§Examples
use ailloli_ui_core::Color;
use ailloli_ui_render_wgpu::TargetLoadOp;
let overlay = TargetLoadOp::Load;
let standalone = TargetLoadOp::Clear(Color::BLACK);
assert_ne!(overlay, standalone);Variants§
Load
Preserve the initialized destination, including when the UI has no layers.
Initialize it in an earlier submitted command or an earlier pass in the same encoder. Backdrop effects and destination blends read that content.
Clear(Color)
Clear the full attachment before destination reads or UI drawing.
The clear still runs for empty UI or a backdrop as the first layer. The
color follows the same conventions as crate::Renderer::render_layered.
Trait Implementations§
Source§impl Clone for TargetLoadOp
impl Clone for TargetLoadOp
Source§fn clone(&self) -> TargetLoadOp
fn clone(&self) -> TargetLoadOp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetLoadOp
impl Debug for TargetLoadOp
Source§impl PartialEq for TargetLoadOp
impl PartialEq for TargetLoadOp
impl Copy for TargetLoadOp
impl StructuralPartialEq for TargetLoadOp
Auto Trait Implementations§
impl Freeze for TargetLoadOp
impl RefUnwindSafe for TargetLoadOp
impl Send for TargetLoadOp
impl Sync for TargetLoadOp
impl Unpin for TargetLoadOp
impl UnwindSafe for TargetLoadOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
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>
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>
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