pub struct Frame {Show 15 fields
pub device_rect: DeviceIntRect,
pub present: bool,
pub passes: Vec<RenderPass, FrameAllocator>,
pub transform_palette: Vec<TransformData, FrameAllocator>,
pub render_tasks: RenderTaskGraph,
pub prim_headers: PrimitiveHeaders,
pub gpu_cache_frame_id: FrameId,
pub deferred_resolves: Vec<DeferredResolve, FrameAllocator>,
pub has_texture_cache_tasks: bool,
pub has_been_rendered: bool,
pub debug_items: Vec<DebugItem>,
pub composite_state: CompositeState,
pub gpu_buffer_f: GpuBuffer<GpuBufferBlockF>,
pub gpu_buffer_i: GpuBuffer<GpuBufferBlockI>,
pub allocator_memory: FrameMemory,
}
Expand description
A rendering-oriented representation of the frame built by the render backend and presented to the renderer.
§Safety
The frame’s allocator memory must be dropped after all of the frame’s containers.
This is handled in the renderer and in RenderedDocument
’s Drop implementation.
Fields§
§device_rect: DeviceIntRect
The rectangle to show the frame in, on screen.
present: bool
§passes: Vec<RenderPass, FrameAllocator>
§transform_palette: Vec<TransformData, FrameAllocator>
§render_tasks: RenderTaskGraph
§prim_headers: PrimitiveHeaders
§gpu_cache_frame_id: FrameId
The GPU cache frame that the contents of Self depend on
deferred_resolves: Vec<DeferredResolve, FrameAllocator>
List of textures that we don’t know about yet from the backend thread. The render thread will use a callback to resolve these and patch the data structures.
has_texture_cache_tasks: bool
True if this frame contains any render tasks that write to the texture cache.
has_been_rendered: bool
True if this frame has been drawn by the renderer.
debug_items: Vec<DebugItem>
Debugging information to overlay for this frame.
composite_state: CompositeState
Contains picture cache tiles, and associated information. Used by the renderer to composite tiles into the framebuffer, or hand them off to an OS compositor.
gpu_buffer_f: GpuBuffer<GpuBufferBlockF>
Main GPU data buffer constructed (primarily) during the prepare pass for primitives that were visible and dirty.
gpu_buffer_i: GpuBuffer<GpuBufferBlockI>
§allocator_memory: FrameMemory
The backing store for the frame’s allocator.
§Safety
Must not be dropped while frame allocations are alive.
Rust has deterministic drop order 1. We rely on allocator_memory
being the last member of the Frame
struct so that it is dropped
after the frame’s containers.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl !RefUnwindSafe for Frame
impl Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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> 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>
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>
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