Module recalc

Module recalc 

Source
Expand description

Style recalculation change tracking.

This module provides StyleRecalcChange, a graduated system for tracking what kind of style recalculation is needed. Inspired by Chromium’s approach, this enables optimizations like:

  • Skipping style recalc entirely for unchanged views
  • Using fast “inherited only” paths when only inherited props changed
  • Limiting recalc to immediate children vs entire subtrees

§Comparison with ChangeFlags

The existing [ChangeFlags] are binary: a view either needs style recalc or doesn’t. StyleRecalcChange adds why the recalc is needed, enabling optimization decisions.

Structs§

InheritedChanges
Tracks which inherited properties actually changed.
InheritedGroups
Groups of inherited properties that can change together.
RecalcFlags
Additional flags that modify how style recalculation proceeds.
StyleRecalcChange
Tracks what kind of style recalculation is needed.

Enums§

Propagate
Describes how style changes should propagate to children.