pub struct WindowInternal {
pub document_id: DocumentId,
pub pipeline_id: PipelineId,
pub epoch: Epoch,
pub cached_display_list: CachedDisplayList,
pub layout_result: SolvedLayoutCache,
pub gl_texture_cache: GlTextureCache,
pub scrolled_nodes: BTreeMap<DomId, ScrolledNodes>,
pub scroll_states: ScrollStates,
}
Fields§
§document_id: DocumentId
A “document” in WebRender usually corresponds to one tab (i.e. in Azuls case, the whole window).
pipeline_id: PipelineId
One “document” (tab) can have multiple “pipelines” (important for hit-testing).
A document can have multiple pipelines, for example in Firefox the tab / navigation bar, the actual browser window and the inspector are seperate pipelines, but contained in one document. In Azul, one pipeline = one document (this could be improved later on).
epoch: Epoch
The “epoch” is a frame counter, to remove outdated images, fonts and OpenGL textures when they’re not in use anymore.
cached_display_list: CachedDisplayList
Current display list active in this window (useful for debugging)
layout_result: SolvedLayoutCache
Currently active, layouted rectangles
gl_texture_cache: GlTextureCache
Currently GL textures inside the active CachedDisplayList
scrolled_nodes: BTreeMap<DomId, ScrolledNodes>
Current scroll states of nodes (x and y position of where they are scrolled)
scroll_states: ScrollStates
States of scrolling animations, updated every frame
Implementations§
Source§impl WindowInternal
impl WindowInternal
Sourcepub fn get_current_scroll_states(
&self,
ui_states: &BTreeMap<DomId, UiState>,
) -> BTreeMap<DomId, BTreeMap<NodeId, ScrollPosition>>
pub fn get_current_scroll_states( &self, ui_states: &BTreeMap<DomId, UiState>, ) -> BTreeMap<DomId, BTreeMap<NodeId, ScrollPosition>>
Returns a copy of the current scroll states + scroll positions