-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
DisplayListBuilder has similar stateful interfaces like the clip and transform methods similar to other graphics packages, but it also has stateful interfaces for attributes (color, filters, alpha, stroke parameters, etc.) which are much less common. The clip and transform states are typically things you want to inherit across an entire rendering cycle, the attributes - much less so.
As of flutter/engine#32860 the Builder class now has optional rendering operations that are stateless with respect to the rendering attributes.
Given the relative ease of use for the stateless interface (in that you don't have to worry about the previous state for many attributes that you don't want to accidentally inherit), it would probably be best if we deleted the attribute-stateful methods from DisplayListBuilder, leaving only clip and transform as remaining state.
Note that this would not require the actual DisplayList storage mechanism to embrace stateless attributes, but the synchronization of the attributes between calls made on Builder would be handled behind the scenes for the convenience of the developers using the Builder interface.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status