pub struct OverlayCompositor { /* private fields */ }Expand description
Compositor de la capa de overlay: alpha-blittea una textura source (el
overlay rasterizado por vello sobre fondo transparente) SOBRE una textura
target (la intermedia, que ya tiene la UI principal + el video pintado por
gpu_paint). Resuelve el z-order: sin esto, el blit de gpu_paint (video)
queda encima de la capa vello del overlay y los menús se ven por debajo del
video.
Es un pase de pantalla completa (triángulo) que samplea el source y lo
emite con alpha-over. El factor de blend asume alpha premultiplicado
(lo que produce vello); si en pantalla los menús se ven con halos oscuros o
transparencia rara, exportar LLIMPHI_OVERLAY_BLEND=straight para usar
alpha recto sin recompilar.
Implementations§
Source§impl OverlayCompositor
impl OverlayCompositor
pub fn new(device: &Device) -> Self
Sourcepub fn composite(
&self,
device: &Device,
encoder: &mut CommandEncoder,
target: &TextureView,
source: &TextureView,
)
pub fn composite( &self, device: &Device, encoder: &mut CommandEncoder, target: &TextureView, source: &TextureView, )
Compone source (overlay con fondo transparente) sobre target (la
intermedia), preservando el contenido previo del target (LoadOp::Load)
y mezclando con alpha. Graba un render pass en encoder.
Auto Trait Implementations§
impl !RefUnwindSafe for OverlayCompositor
impl !UnwindSafe for OverlayCompositor
impl Freeze for OverlayCompositor
impl Send for OverlayCompositor
impl Sync for OverlayCompositor
impl Unpin for OverlayCompositor
impl UnsafeUnpin for OverlayCompositor
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.