struct Document {
Show 22 fields id: DocumentId, removed_pipelines: Vec<(PipelineId, DocumentId)>, view: DocumentView, stamp: FrameStamp, scene: BuiltScene, frame_builder: FrameBuilder, rg_builder: RenderTaskGraphBuilder, hit_tester: Option<Arc<HitTester>>, shared_hit_tester: Arc<SharedHitTester>, dynamic_properties: SceneProperties, frame_is_valid: bool, hit_tester_is_valid: bool, rendered_frame_is_valid: bool, has_built_scene: bool, data_stores: DataStores, spatial_tree: SpatialTree, minimap_data: FastHashMap<ExternalScrollId, MinimapData>, scratch: ScratchBuffer, prev_composite_descriptor: CompositeDescriptor, dirty_rects_are_valid: bool, profile: TransactionProfile, frame_stats: Option<FullFrameStats>,
}

Fields§

§id: DocumentId

The id of this document

§removed_pipelines: Vec<(PipelineId, DocumentId)>

Temporary list of removed pipelines received from the scene builder thread and forwarded to the renderer.

§view: DocumentView§stamp: FrameStamp

The id and time of the current frame.

§scene: BuiltScene

The latest built scene, usable to build frames. received from the scene builder thread.

§frame_builder: FrameBuilder

The builder object that prodces frames, kept around to preserve some retained state.

§rg_builder: RenderTaskGraphBuilder

Allows graphs of render tasks to be created, and then built into an immutable graph output.

§hit_tester: Option<Arc<HitTester>>

A data structure to allow hit testing against rendered frames. This is updated every time we produce a fully rendered frame.

§shared_hit_tester: Arc<SharedHitTester>

To avoid synchronous messaging we update a shared hit-tester that other threads can query.

§dynamic_properties: SceneProperties

Properties that are resolved during frame building and can be changed at any time without requiring the scene to be re-built.

§frame_is_valid: bool

Track whether the last built frame is up to date or if it will need to be re-built before rendering again.

§hit_tester_is_valid: bool§rendered_frame_is_valid: bool§has_built_scene: bool

We track this information to be able to display debugging information from the renderer.

§data_stores: DataStores§spatial_tree: SpatialTree

Retained frame-building version of the spatial tree

§minimap_data: FastHashMap<ExternalScrollId, MinimapData>§scratch: ScratchBuffer

Contains various vecs of data that is used only during frame building, where we want to recycle the memory each new display list, to avoid constantly re-allocating and moving memory around.

§prev_composite_descriptor: CompositeDescriptor

Tracks the state of the picture cache tiles that were composited on the previous frame.

§dirty_rects_are_valid: bool

Tracks if we need to invalidate dirty rects for this document, due to the picture cache slice configuration having changed when a new scene is swapped in.

§profile: TransactionProfile§frame_stats: Option<FullFrameStats>

Implementations§

source§

impl Document

source

pub fn new(id: DocumentId, size: DeviceIntSize) -> Self

source

fn can_render(&self) -> bool

source

fn has_pixels(&self) -> bool

source

fn process_frame_msg(&mut self, message: FrameMsg) -> DocumentOps

source

fn build_frame( &mut self, resource_cache: &mut ResourceCache, gpu_cache: &mut GpuCache, debug_flags: DebugFlags, tile_caches: &mut FastHashMap<SliceId, Box<TileCacheInstance>>, frame_stats: Option<FullFrameStats>, render_reasons: RenderReasons ) -> RenderedDocument

source

fn rebuild_hit_tester(&mut self)

source

pub fn updated_pipeline_info(&mut self) -> PipelineInfo

source

pub fn set_scroll_offsets( &mut self, id: ExternalScrollId, offsets: Vec<SampledScrollOffset> ) -> bool

Returns true if the node actually changed position or false otherwise.

source

fn update_tile_caches_for_new_scene( &mut self, requested_tile_caches: FastHashMap<SliceId, TileCacheParams>, tile_caches: &mut FastHashMap<SliceId, Box<TileCacheInstance>>, resource_cache: &mut ResourceCache )

Update the state of tile caches when a new scene is being swapped in to the render backend. Retain / reuse existing caches if possible, and destroy any now unused caches.

source

pub fn new_async_scene_ready( &mut self, built_scene: BuiltScene, recycler: &mut Recycler, tile_caches: &mut FastHashMap<SliceId, Box<TileCacheInstance>>, resource_cache: &mut ResourceCache )

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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.
§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.