pub struct MockLayer { /* private fields */ }Expand description
A layer that shows nothing, and keeps what it shows now: the buffer presented last, as its
current_picture, and the layers placed under it then;
and how many pictures it was handed. Presents release their buffers at once.
Implementations§
Source§impl MockLayer
impl MockLayer
Sourcepub fn children(&self) -> Vec<(Arc<dyn CompositionLayer>, Placement)>
pub fn children(&self) -> Vec<(Arc<dyn CompositionLayer>, Placement)>
The layers placed under the picture the layer shows now, the bottom-most first, each where it is placed; none before its first picture.
Sourcepub fn of(layer: &dyn CompositionLayer) -> Option<&MockLayer>
pub fn of(layer: &dyn CompositionLayer) -> Option<&MockLayer>
The MockLayer a layer MockCompositor made is.
Trait Implementations§
Source§impl CompositionLayer for MockLayer
impl CompositionLayer for MockLayer
Source§fn present(
&self,
buffer: Arc<dyn HardwareBuffer>,
children: Vec<(Arc<dyn CompositionLayer>, Placement)>,
released: Box<dyn FnOnce() + Send + Sync>,
)
fn present( &self, buffer: Arc<dyn HardwareBuffer>, children: Vec<(Arc<dyn CompositionLayer>, Placement)>, released: Box<dyn FnOnce() + Send + Sync>, )
Shows
buffer, which fills the layer, and children beneath it, the bottom-most first,
from the compositor’s next frame on, in one step, in place of what the layer showed: the
buffers presented before, or a layer the system draws into, such as a player’s, whose
picture goes nowhere then. A layer shows one source at a time, the last given it. Each
child lies where its placement says in the buffer’s pixels, as a scene places a layer in
its view’s, so the buffer’s own placement moves, clips and scales it with it. A child the
last present showed and this one does not name is let go; a layer another parent holds is
not shown here, and is reported. Read moreSource§fn current_picture(&self) -> Option<LayerPicture>
fn current_picture(&self) -> Option<LayerPicture>
What the layer shows now: the last buffer presented, or the current frame of the video or
camera it shows.
None while it shows nothing, and while it shows a layer the system draws
into that the host does not read, such as one an app shows on it itself.Auto Trait Implementations§
impl !Freeze for MockLayer
impl Forget for MockLayer
impl Move for MockLayer
impl RefUnwindSafe for MockLayerwhere
Mutex<Option<(Arc<dyn HardwareBuffer>, Vec<(Arc<dyn CompositionLayer>, Placement)>)>>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
impl Send for MockLayer
impl Sync for MockLayer
impl Unpin for MockLayer
impl UnsafeUnpin for MockLayerwhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const ArcInner<dyn HardwareBuffer> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn HardwareBuffer>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(Arc<dyn CompositionLayer>, Placement)>: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
impl UnwindSafe for MockLayerwhere
Mutex<Option<(Arc<dyn HardwareBuffer>, Vec<(Arc<dyn CompositionLayer>, Placement)>)>>: UnwindSafe,
Align8<usize>: UnwindSafe,
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