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>

source

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.

source

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.

source

pub fn query_status(&self) -> Result<Type, VaError>

Wrapper over vaQuerySurfaceStatus to find out any pending ops on the render target.

source

pub fn query_error(&self) -> Result<Vec<SurfaceDecodeMBError>, VaError>

source

pub fn id(&self) -> VASurfaceID

Returns the ID of this surface.

source

pub fn size(&self) -> (u32, u32)

Returns the dimensions of this surface.

source

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>

source§

fn as_mut(&mut self) -> &mut D

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<D: SurfaceMemoryDescriptor> AsRef<D> for Surface<D>

source§

fn as_ref(&self) -> &D

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<D: SurfaceMemoryDescriptor> Drop for Surface<D>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.