Skip to main content

HostGpu

Struct HostGpu 

Source
pub struct HostGpu {
    pub id: Option<GpuId>,
    pub video_decoders: Option<Rc<dyn VideoDecoders>>,
    pub hardware_buffer_allocator: Option<Arc<dyn HardwareBufferAllocator>>,
}
Expand description

A GPU as a host gathers it: its name and what the system made for it, which every host hands out as its SystemGpu.

Fields§

§id: Option<GpuId>§video_decoders: Option<Rc<dyn VideoDecoders>>§hardware_buffer_allocator: Option<Arc<dyn HardwareBufferAllocator>>

Trait Implementations§

Source§

impl SystemGpu for HostGpu

Source§

fn id(&self) -> Option<GpuId>

The GPU as its system names it; None where the system names none.
Source§

fn video_decoders(&self) -> Option<Rc<dyn VideoDecoders>>

Its video decoders, on its video hardware and on the processor, whose pictures are in its memory; None where the system decodes no video for the app.
Source§

fn hardware_buffer_allocator(&self) -> Option<Arc<dyn HardwareBufferAllocator>>

What allocates its hardware buffers, from any thread; None where the system allocates none.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>