struct Surface {
kind: RenderTargetKind,
allocator: GuillotineAllocator,
is_shared: bool,
free_after: PassId,
}Expand description
An internal representation of a dynamic surface that tasks can be allocated into. Maintains some extra metadata about each surface during the graph build.
Fields§
§kind: RenderTargetKindWhether this is a color or alpha render target
allocator: GuillotineAllocatorAllocator for this surface texture
We can only allocate into this for reuse if it’s a shared surface
free_after: PassIdThe pass that we can free this surface after (guaranteed to be the same for all tasks assigned to this surface)
Implementations§
Source§impl Surface
impl Surface
Sourcefn alloc_rect(
&mut self,
size: DeviceIntSize,
kind: RenderTargetKind,
is_shared: bool,
free_after: PassId,
) -> Option<DeviceIntPoint>
fn alloc_rect( &mut self, size: DeviceIntSize, kind: RenderTargetKind, is_shared: bool, free_after: PassId, ) -> Option<DeviceIntPoint>
Allocate a rect within a shared surfce. Returns None if the format doesn’t match, or allocation fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnwindSafe for Surface
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