webrender::frame_builder

Struct Frame

Source
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§

Source§

impl Frame

Source

pub fn must_be_drawn(&self) -> bool

Source

pub fn is_nop(&self) -> bool

Trait Implementations§

Source§

impl Serialize for Frame

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.