Struct LockedResource

Source
pub struct LockedResource(/* private fields */);
Expand description

A resource that is intended for sharing between threads. Locked resources such as textures or framebuffers will not allow any further modifications while it remains locked. The resource will be unlocked when LockedResource is dropped.

Implementations§

Source§

impl LockedResource

Source

pub fn composite( &self, locked_src: &LockedResource, src_x: GLint, src_y: GLint, src_width: GLsizei, src_height: GLsizei, dst_x: GLint, dst_y: GLint, dst_width: GLsizei, dst_height: GLsizei, opaque: bool, flip_x: bool, flip_y: bool, filter: GLenum, clip_x: GLint, clip_y: GLint, clip_width: GLsizei, clip_height: GLsizei, )

Composites from a locked resource to another locked resource. The band offset and height are relative to the destination rectangle and specify how to clip the composition into appropriate range for this band.

Source

pub fn composite_yuv( &self, locked_y: &LockedResource, locked_u: &LockedResource, locked_v: &LockedResource, color_space: YuvRangedColorSpace, color_depth: GLuint, src_x: GLint, src_y: GLint, src_width: GLsizei, src_height: GLsizei, dst_x: GLint, dst_y: GLint, dst_width: GLsizei, dst_height: GLsizei, flip_x: bool, flip_y: bool, clip_x: GLint, clip_y: GLint, clip_width: GLsizei, clip_height: GLsizei, )

Composites from locked resources representing YUV planes

Source

pub fn get_buffer(&self) -> (*mut c_void, i32, i32, i32)

Get the underlying buffer for a locked resource

Trait Implementations§

Source§

impl Clone for LockedResource

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Drop for LockedResource

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for LockedResource

Source§

impl Sync for LockedResource

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.