pub struct MockCompositor { /* private fields */ }Expand description
A compositor whose layers show nowhere and keep what they show now (MockLayer), kept in
the order made. It accepts the buffers the test gives it, none unless told. Every clone is the
same compositor.
Implementations§
Source§impl MockCompositor
impl MockCompositor
pub fn new() -> MockCompositor
Sourcepub fn accepting(accepted: AcceptedBuffers) -> MockCompositor
pub fn accepting(accepted: AcceptedBuffers) -> MockCompositor
A compositor that answers accepted for the buffers it shows.
Trait Implementations§
Source§impl Clone for MockCompositor
impl Clone for MockCompositor
Source§impl Compositor for MockCompositor
impl Compositor for MockCompositor
Source§fn make_layer(&self, opaque: bool) -> Arc<dyn CompositionLayer> ⓘ
fn make_layer(&self, opaque: bool) -> Arc<dyn CompositionLayer> ⓘ
A layer placed nowhere yet, fed by a producer from any thread, and shown wherever the one
that places it says: a view’s scenes, or another layer’s presents.
opaque says whether
its buffers carry no alpha the compositor must blend; a present that gives it children,
which show through the clear pixels of its buffer, has that buffer blended all the same.
The layer goes when its last handle does: its producer’s, and those of the frames that
place it.Source§fn accepted_buffers(&self) -> AcceptedBuffers
fn accepted_buffers(&self) -> AcceptedBuffers
The buffers its layers show: what a producer that makes its own buffers makes, so that
none is refused or copied between GPUs. It answers as the compositor was made, and does not
change after.
Auto Trait Implementations§
impl Forget for MockCompositor
impl Freeze for MockCompositor
impl Move for MockCompositor
impl RefUnwindSafe for MockCompositor
impl Send for MockCompositor
impl Sync for MockCompositor
impl Unpin for MockCompositor
impl UnsafeUnpin for MockCompositorwhere
*const ArcInner<Mutex<Vec<Arc<MockLayer>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Vec<Arc<MockLayer>>>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<GpuMemory>: UnsafeUnpin,
impl UnwindSafe for MockCompositor
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