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>
pub fn display(&self) -> &Arc<Display>
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>
Source§impl<D: SurfaceMemoryDescriptor> Drop for Surface<D>
impl<D: SurfaceMemoryDescriptor> Drop 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>where
D: Send,
impl<D> Sync for Surface<D>where
D: Sync,
impl<D> Unpin for Surface<D>where
D: Unpin,
impl<D> UnsafeUnpin for Surface<D>where
D: UnsafeUnpin,
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