struct Allocations {
render_tasks: AllocationManager<RenderTaskType>,
paths: AllocationManager<PathEl>,
strips: AllocationManager<Strip>,
recorded_commands: AllocationManager<RecordedCommand>,
}Expand description
A structure to keep track of allocations that will be done while rendering with multi-threading.
Fields§
§render_tasks: AllocationManager<RenderTaskType>The render tasks of a batch. They will be filled by the main thread as new fill/stroke commands come in and consumed by worker threads as they process them.
paths: AllocationManager<PathEl>The path store of a batch. It will be filled by the main thread as new commands come in and be used by the worker thread to generate the strips of a path.
strips: AllocationManager<Strip>Stores allocations that are used by the worker thread to produce strips. They will be sent back to the main thread which then records the corresponding commands.
recorded_commands: AllocationManager<RecordedCommand>The commands produced by a worker thread, which will be recorded by the main thread.
Implementations§
Source§impl Allocations
impl Allocations
Sourcefn get(&mut self) -> AllocationGroup
fn get(&mut self) -> AllocationGroup
Return a new allocation group.
The group is guaranteed to have been cleared.
fn put(&mut self, allocation: AllocationGroup)
Trait Implementations§
Source§impl Default for Allocations
impl Default for Allocations
Source§fn default() -> Allocations
fn default() -> Allocations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Allocations
impl RefUnwindSafe for Allocations
impl Send for Allocations
impl Sync for Allocations
impl Unpin for Allocations
impl UnsafeUnpin for Allocations
impl UnwindSafe for Allocations
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> 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