#[non_exhaustive]pub enum RenderMode {
Dedicated,
Integrated,
Software,
}
Expand description
Render backend preference.
This is mostly a trade-off between performance, power consumption and cold startup time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dedicated
Prefer the best dedicated GPU, probably the best performance after initialization, but also the most power consumption.
Falls back to Integrated
, then Software
.
Integrated
Prefer the integrated GPU (provided by the CPU), probably the best power consumption and good performance for most GUI applications, this is the default value.
Falls back to Dedicated
, then Software
.
Software
Use a software render fallback, this has the best compatibility and best initialization time. This is probably the best pick for one frame render tasks and small windows where the initialization time of a GPU context may not offset the render time gains.
If the view-process implementation has no software, falls back to Integrated
, then Dedicated
.
Implementations§
Source§impl RenderMode
impl RenderMode
Sourcepub fn fallbacks(self) -> [RenderMode; 2]
pub fn fallbacks(self) -> [RenderMode; 2]
Returns fallbacks that view-process implementers will try if self
is not available.
Sourcepub fn with_fallbacks(self) -> [RenderMode; 3]
pub fn with_fallbacks(self) -> [RenderMode; 3]
Returns self
plus fallbacks
.
Trait Implementations§
Source§impl Clone for RenderMode
impl Clone for RenderMode
Source§fn clone(&self) -> RenderMode
fn clone(&self) -> RenderMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RenderMode
impl Debug for RenderMode
Source§impl Default for RenderMode
impl Default for RenderMode
Source§impl<'de> Deserialize<'de> for RenderMode
impl<'de> Deserialize<'de> for RenderMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RenderMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RenderMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for RenderMode
impl Hash for RenderMode
Source§impl IntoVar<Option<RenderMode>> for RenderMode
impl IntoVar<Option<RenderMode>> for RenderMode
Source§impl PartialEq for RenderMode
impl PartialEq for RenderMode
Source§impl Serialize for RenderMode
impl Serialize for RenderMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for RenderMode
impl Eq for RenderMode
impl IntoValue<Option<RenderMode>> for RenderMode
impl StructuralPartialEq for RenderMode
Auto Trait Implementations§
impl Freeze for RenderMode
impl RefUnwindSafe for RenderMode
impl Send for RenderMode
impl Sync for RenderMode
impl Unpin for RenderMode
impl UnwindSafe for RenderMode
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
and other
are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other
if both are of the same type.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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more