Struct webrender::render_task_graph::Surface
source · 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: RenderTargetKind
Whether this is a color or alpha render target
allocator: GuillotineAllocator
Allocator for this surface texture
We can only allocate into this for reuse if it’s a shared surface
free_after: PassId
The 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