pub struct RendererOptions {
pub tier: Option<Tier>,
pub adapter: AdapterChoice,
pub budget: SampleBudget,
}Expand description
Construction-time options for an on-surface Renderer (Plan 0044).
One field today and a struct anyway, because the tier pin is the first of a family: a renderer’s construction choices (quality, later backend or format preferences) are decided once and never per frame, and threading them as positional arguments is how the three constructors drift apart.
Fields§
§tier: Option<Tier>An explicit tier pin, or None for auto — which resolves Tier::Rich
and leaves the frame-time governor free to demote it once (ADR-0045). A
pin is honoured in both directions and never demotes.
adapter: AdapterChoiceWhich graphics adapter the window’s context asks for.
AdapterChoice::Default is what the surface path asked for before this
field existed and stays the default here: an operator’s --gpu is a
lever, not a new preference. Changing what an unflagged window selects
would re-base every frame-time figure this project has published, which
is a measurement question and not an argument-parsing one (ADR-0155).
Carrying a AdapterChoice::Named String is why this struct is
Clone rather than Copy.
budget: SampleBudgetWhich of the tier’s two attractor sample ceilings to resolve against
(ADR-0140). SampleBudget::Live by default, so every caller that does
not ask resolves exactly what it resolved before the choice existed.
Implementations§
Trait Implementations§
Source§impl Clone for RendererOptions
impl Clone for RendererOptions
Source§fn clone(&self) -> RendererOptions
fn clone(&self) -> RendererOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RendererOptions
impl Debug for RendererOptions
Source§impl Default for RendererOptions
impl Default for RendererOptions
Source§fn default() -> RendererOptions
fn default() -> RendererOptions
Source§impl PartialEq for RendererOptions
impl PartialEq for RendererOptions
Source§fn eq(&self, other: &RendererOptions) -> bool
fn eq(&self, other: &RendererOptions) -> bool
self and other values to be equal, and is used by ==.impl Eq for RendererOptions
impl StructuralPartialEq for RendererOptions
Auto Trait Implementations§
impl Freeze for RendererOptions
impl RefUnwindSafe for RendererOptions
impl Send for RendererOptions
impl Sync for RendererOptions
impl Unpin for RendererOptions
impl UnsafeUnpin for RendererOptions
impl UnwindSafe for RendererOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.