pub enum RendererChoice {
Cpu,
Gpu,
Auto,
}Expand description
Which renderer a window presents with.
The CPU renderer keeps a pixmap and repaints only the frame’s damage. The GPU renderer draws the whole frame on every present, with no damage tracking. Both draw the same display list.
Variants§
Cpu
The CPU renderer. Always available.
Gpu
The GPU renderer through vello.
Needs the gpu feature and an adapter that can present to the window.
The adapter comes from the Vulkan, Metal or DX12 backend first, and
from any backend, OpenGL included, when none of those can present to
the window. A run with this choice fails when no adapter is found
either way; it never falls back to the CPU renderer on its own.
Auto
The GPU renderer when the window’s adapter is a real GPU, and the CPU
renderer otherwise: when the adapter is a software rasterizer such as
llvmpipe or SwiftShader, when no Vulkan, Metal or DX12 adapter exists,
when the window surface cannot present GPU frames, or while the damage
overlay is on. This choice never uses OpenGL, which serves the GPU
renderer’s compute shaders poorly. The default in builds with the
gpu feature.
Trait Implementations§
Source§impl Clone for RendererChoice
impl Clone for RendererChoice
impl Copy for RendererChoice
Source§impl Debug for RendererChoice
impl Debug for RendererChoice
Source§impl Default for RendererChoice
impl Default for RendererChoice
Source§fn default() -> RendererChoice
fn default() -> RendererChoice
impl Eq for RendererChoice
Source§impl Hash for RendererChoice
impl Hash for RendererChoice
Source§impl PartialEq for RendererChoice
impl PartialEq for RendererChoice
impl StructuralPartialEq for RendererChoice
Auto Trait Implementations§
impl Forget for RendererChoice
impl Freeze for RendererChoice
impl Move for RendererChoice
impl RefUnwindSafe for RendererChoice
impl Send for RendererChoice
impl Sync for RendererChoice
impl Unpin for RendererChoice
impl UnsafeUnpin for RendererChoice
impl UnwindSafe for RendererChoice
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.