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:
PartialRenderer::compute_dirty_regionswill 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.- The Renderer calls
PartialRenderer::filter_itemFor most items. This assume that the cached geometry was requested in the previous step. So it will not register new dependencies. - Then the renderer calls the rendering function for each item that needs to be rendered. This register dependencies only on the rendering tracker.
Structs§
- Cached
Rendering Data - This structure must be present in items that are Rendered and contains information. Used by the backend.
- Dirty
Region - A region composed of a few rectangles that need to be redrawn.
- Partial
Renderer - Put this structure in the renderer to help with partial rendering
- Partial
Rendering State - 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§
- Cached
Item Bounding BoxAnd Transform - After rendering an item, we cache the geometry and the transform it applies to children.
- Repaint
Buffer Type - This enum describes which parts of the buffer passed to the
SoftwareRenderermay be re-used to speed up painting.