pub enum DesktopRenderBackend {
Wgpu,
Software,
}Expand description
桌面与移动端平台默认及可选渲染后端类型。
- 桌面端(
winit::WinitPlatform/wayland::WaylandPlatform)与移动端(mobile::MobileEmbedApp)默认采用自研轻量级wgpu2D SDF GPU 渲染器(DesktopRenderBackend::Wgpu,跨平台统一驱动 Windows D3D12、macOS/iOS Metal、Linux/Android/HarmonyOS Vulkan); - 轻量化与受限显示环境可使用内置零外部依赖 SDF 扫描线软件渲染器(
DesktopRenderBackend::Software)。
Variants§
Wgpu
自研轻量级 wgpu 2D SDF GPU 硬件加速后端(Windows D3D12 / macOS & iOS Metal / Linux & Android Vulkan)。
Software
多线程按水平条带并行的 SDF 扫描线软件渲染后端。
Implementations§
Source§impl DesktopRenderBackend
impl DesktopRenderBackend
Sourcepub const fn default_desktop() -> Self
pub const fn default_desktop() -> Self
返回桌面与移动端平台的默认渲染后端:
- 若启用了
gpu(默认开启),选择DesktopRenderBackend::Wgpu; - 否则回退至内置
DesktopRenderBackend::Software。
Trait Implementations§
Source§impl Clone for DesktopRenderBackend
impl Clone for DesktopRenderBackend
impl Copy for DesktopRenderBackend
Source§impl Debug for DesktopRenderBackend
impl Debug for DesktopRenderBackend
Source§impl Default for DesktopRenderBackend
impl Default for DesktopRenderBackend
impl Eq for DesktopRenderBackend
Source§impl PartialEq for DesktopRenderBackend
impl PartialEq for DesktopRenderBackend
impl StructuralPartialEq for DesktopRenderBackend
Auto Trait Implementations§
impl Forget for DesktopRenderBackend
impl Freeze for DesktopRenderBackend
impl Move for DesktopRenderBackend
impl RefUnwindSafe for DesktopRenderBackend
impl Send for DesktopRenderBackend
impl Sync for DesktopRenderBackend
impl Unpin for DesktopRenderBackend
impl UnsafeUnpin for DesktopRenderBackend
impl UnwindSafe for DesktopRenderBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。