Module partial_renderer

Module partial_renderer 

Source
Expand description

Module for a renderer proxy that tries to render only the parts of the tree that have changed.

This is the way the partial renderer work:

  1. PartialRenderer::compute_dirty_regions will go over the items and try to compute the region that needs to be repainted. If either the bounding box has changed, or the PropertyTracker that tracks the rendering properties is dirty, then the region is marked dirty. That pass also register dependencies on every geometry, and on the non-dirty property trackers.
  2. The Renderer calls PartialRenderer::filter_item For most items. This assume that the cached geometry was requested in the previous step. So it will not register new dependencies.
  3. Then the renderer calls the rendering function for each item that needs to be rendered. This register dependencies only on the rendering tracker.

Structs§

CachedRenderingData
This structure must be present in items that are Rendered and contains information. Used by the backend.
DirtyRegion
A region composed of a few rectangles that need to be redrawn.
PartialRenderer
Put this structure in the renderer to help with partial rendering
PartialRenderingState
This struct holds the state of the partial renderer between different frames, in particular the cache of the bounding rect of each item. This permits a more fine-grained computation of the region that needs to be repainted.

Enums§

CachedItemBoundingBoxAndTransform
After rendering an item, we cache the geometry and the transform it applies to children.
RepaintBufferType
This enum describes which parts of the buffer passed to the SoftwareRenderer may be re-used to speed up painting.