SceneTextLayoutCache class

LRU cache for TextPainter layout results for TextNode.

Why: avoid recomputing text layout on every paint when inputs are unchanged. Invariant: cached layout is valid only while the key (text + style + layout constraints) is unchanged. Validate: test/render/scene_text_layout_cache_test.dart.

Constructors

SceneTextLayoutCache({int maxEntries = 256})

Properties

debugBuildCount int
no setter
debugEvictCount int
no setter
debugHitCount int
no setter
debugSize int
no setter
hashCode int
The hash code for this object.
no setterinherited
maxEntries int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
getOrBuild({required TextNode node, required TextStyle textStyle, required double maxWidth}) TextPainter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited