Struct cros_libva::Surface
source · pub struct Surface<D: SurfaceMemoryDescriptor> { /* private fields */ }
Expand description
An owned VA surface that is tied to a particular Display
.
Implementations§
source§impl<D: SurfaceMemoryDescriptor> Surface<D>
impl<D: SurfaceMemoryDescriptor> Surface<D>
sourcepub fn sync(&self) -> Result<(), VaError>
pub fn sync(&self) -> Result<(), VaError>
Wrapper around vaSyncSurface
that blocks until all pending operations on the render
target have been completed.
Upon return it is safe to use the render target for a different picture.
sourcepub fn as_id_vec(surfaces: &[Self]) -> Vec<VASurfaceID>
pub fn as_id_vec(surfaces: &[Self]) -> Vec<VASurfaceID>
Convenience function to return a VASurfaceID vector. Useful to interface with the C API where a surface array might be needed.
sourcepub fn query_status(&self) -> Result<Type, VaError>
pub fn query_status(&self) -> Result<Type, VaError>
Wrapper over vaQuerySurfaceStatus
to find out any pending ops on the render target.
pub fn query_error(&self) -> Result<Vec<SurfaceDecodeMBError>, VaError>
sourcepub fn id(&self) -> VASurfaceID
pub fn id(&self) -> VASurfaceID
Returns the ID of this surface.
sourcepub fn export_prime(&self) -> Result<DrmPrimeSurfaceDescriptor, VaError>
pub fn export_prime(&self) -> Result<DrmPrimeSurfaceDescriptor, VaError>
Returns a PRIME descriptor for this surface.
Trait Implementations§
source§impl<D: SurfaceMemoryDescriptor> AsMut<D> for Surface<D>
impl<D: SurfaceMemoryDescriptor> AsMut<D> for Surface<D>
source§impl<D: SurfaceMemoryDescriptor> AsRef<D> for Surface<D>
impl<D: SurfaceMemoryDescriptor> AsRef<D> for Surface<D>
Auto Trait Implementations§
impl<D> Freeze for Surface<D>where
D: Freeze,
impl<D> RefUnwindSafe for Surface<D>where
D: RefUnwindSafe,
impl<D> !Send for Surface<D>
impl<D> !Sync for Surface<D>
impl<D> Unpin for Surface<D>where
D: Unpin,
impl<D> UnwindSafe for Surface<D>where
D: 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