Skip to main content

RendererShared

Struct RendererShared 

Source
pub struct RendererShared { /* private fields */ }
Expand description

可跨窗口复用的 Renderer GPU 资源(pipeline / bind group layout / blit sampler / glyph atlas / 图片纹理缓存)。

layer 缓存与 batch buffer 仍由各窗口 Renderer 独立持有(LayerId 只在单树内唯一)。

Implementations§

Source§

impl RendererShared

Source

pub fn format(&self) -> TextureFormat

Source

pub fn evict_images(&self, protected: &HashSet<u32>)

多窗口 host 在一个渲染周期后调用:保护所有窗口最近一帧使用的纹理, 超预算时淘汰其余最旧纹理。

Trait Implementations§

Source§

impl Clone for RendererShared

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for RendererShared

§

impl !Send for RendererShared

§

impl !Sync for RendererShared

§

impl !UnwindSafe for RendererShared

§

impl Forget for RendererShared

§

impl Freeze for RendererShared
where *const ArcInner<CoreRenderPipeline> is !null: Freeze, PhantomData<ArcInner<CoreRenderPipeline>>: Freeze, *const ArcInner<CoreBindGroupLayout> is !null: Freeze, PhantomData<ArcInner<CoreBindGroupLayout>>: Freeze, *const ArcInner<CoreSampler> is !null: Freeze, PhantomData<ArcInner<CoreSampler>>: Freeze, *const RcInner<RefCell<Option<AtlasGpu>>> is !null: Freeze, PhantomData<RcInner<RefCell<Option<AtlasGpu>>>>: Freeze, *const RcInner<RefCell<ImageTextureCache>> is !null: Freeze, PhantomData<RcInner<RefCell<ImageTextureCache>>>: Freeze,

§

impl Move for RendererShared

§

impl Unpin for RendererShared
where Arc<CoreRenderPipeline>: Unpin, Arc<CoreBindGroupLayout>: Unpin, Arc<CoreSampler>: Unpin, Rc<RefCell<Option<AtlasGpu>>>: Unpin, Rc<RefCell<ImageTextureCache>>: Unpin,

§

impl UnsafeUnpin for RendererShared
where *const ArcInner<CoreRenderPipeline> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreRenderPipeline>>: UnsafeUnpin, *const ArcInner<CoreBindGroupLayout> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreBindGroupLayout>>: UnsafeUnpin, *const ArcInner<CoreSampler> is !null: UnsafeUnpin, PhantomData<ArcInner<CoreSampler>>: UnsafeUnpin, *const RcInner<RefCell<Option<AtlasGpu>>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<Option<AtlasGpu>>>>: UnsafeUnpin, *const RcInner<RefCell<ImageTextureCache>> is !null: UnsafeUnpin, PhantomData<RcInner<RefCell<ImageTextureCache>>>: UnsafeUnpin,

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> 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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> ErasedDestructor for T
where T: 'static,

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> 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 = !

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>