pub struct Surface {
display: Rc<Display>,
id: VASurfaceID,
}
Expand description
An owned VA surface that is tied to the lifetime of a particular VADisplay
Fields
display: Rc<Display>
id: VASurfaceID
Implementations
sourceimpl Surface
impl Surface
sourcepub(crate) fn new(
display: Rc<Display>,
rt_format: u32,
va_fourcc: Option<u32>,
width: u32,
height: u32,
usage_hint: Option<UsageHint>,
num_surfaces: u32
) -> Result<Vec<Self>>
pub(crate) fn new(
display: Rc<Display>,
rt_format: u32,
va_fourcc: Option<u32>,
width: u32,
height: u32,
usage_hint: Option<UsageHint>,
num_surfaces: u32
) -> Result<Vec<Self>>
Create Surfaces
by wrapping around a vaCreateSurfaces
call. This is just a helper for
Display::create_surfaces
.
sourcepub fn sync(&self) -> Result<()>
pub fn sync(&self) -> Result<()>
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>
pub fn query_status(&self) -> Result<Type>
Wrapper over vaQuerySurfaceStatus
to find out any pending ops on the render target.
sourcepub fn id(&self) -> VASurfaceID
pub fn id(&self) -> VASurfaceID
Returns the ID of this surface.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Surface
impl !Send for Surface
impl !Sync for Surface
impl Unpin for Surface
impl UnwindSafe for Surface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more