pub struct UploadBudget {
pub tiles: usize,
pub bytes: usize,
}Expand description
How much a frame uploads at most: tiles and bytes (whichever is
reached first; at least one tile a frame). What is left waits for the
next frame, never dropped. UploadBudget::DEFAULT (8 MiB a frame)
unless the viewport is told otherwise.
Fields§
§tiles: usize§bytes: usizeImplementations§
Source§impl UploadBudget
impl UploadBudget
Sourcepub const DEFAULT: UploadBudget
pub const DEFAULT: UploadBudget
The default: 8 MiB a frame, sixteen 256-pixel tiles of the GPU path’s half floats or thirty-two of 8-bit RGBA. It bounds the copy to the GPU at the render when a fast source (a cache, a GPU pipeline) delivers a whole view at once; a source on worker threads rarely reaches it.
Sourcepub const UNLIMITED: UploadBudget
pub const UNLIMITED: UploadBudget
No limit: every tile arrived is uploaded in the frame that takes it in (the behaviour before the budget existed).
Sourcepub fn tiles(n: usize) -> UploadBudget
pub fn tiles(n: usize) -> UploadBudget
At most n tiles a frame.
Sourcepub fn bytes(n: usize) -> UploadBudget
pub fn bytes(n: usize) -> UploadBudget
At most n bytes a frame (and at least one tile).
Sourcepub fn is_limited(&self) -> bool
pub fn is_limited(&self) -> bool
Whether it limits anything.
Trait Implementations§
Source§impl Clone for UploadBudget
impl Clone for UploadBudget
Source§fn clone(&self) -> UploadBudget
fn clone(&self) -> UploadBudget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadBudget
impl Debug for UploadBudget
Source§impl Default for UploadBudget
impl Default for UploadBudget
Source§impl PartialEq for UploadBudget
impl PartialEq for UploadBudget
impl Copy for UploadBudget
impl Eq for UploadBudget
impl StructuralPartialEq for UploadBudget
Auto Trait Implementations§
impl Freeze for UploadBudget
impl RefUnwindSafe for UploadBudget
impl Send for UploadBudget
impl Sync for UploadBudget
impl Unpin for UploadBudget
impl UnsafeUnpin for UploadBudget
impl UnwindSafe for UploadBudget
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.