flutter/packages
LongCatIsLooong cc01701781
Use a separate TextPainter for intrinsics calculation in RenderEditable and RenderParagraph (#144577)
Use a dedicated `TextPainter` for intrinsic size calculation in `RenderEditable` and `RenderParagraph`.

This is an implementation detail so the change should be covered by existing tests.  Performance wise this shouldn't be significantly slower since SkParagraph [caches the result of slower operations across different paragraphs](9c62e7b382/modules/skparagraph/src/ParagraphCache.cpp (L254-L272)). Existing benchmarks should be able to catch potential regressions (??).

The reason for making this change is to make sure that intrinsic size computations don't destroy text layout artifacts, so I can expose the text layout as a stream of immutable `TextLayout` objects, to signify other render objects that text-layout-dependent-cache (such as caches for `getBoxesForRange` which can be relatively slow to compute) should be invalidated and  `markNeedsPaint` needs to be called if the painting logic depended on text layout.
Without this change, the intrinsics/dry layout calculations will add additional events to the text layout stream, which violates the "dry"/non-destructive contract.
2024-03-16 01:15:19 +00:00
..
flutter Use a separate TextPainter for intrinsics calculation in RenderEditable and RenderParagraph (#144577) 2024-03-16 01:15:19 +00:00
flutter_driver Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
flutter_goldens Rename isAvailableForEnvironment to isForEnvironment (#143176) (#144858) 2024-03-10 06:20:38 +00:00
flutter_localizations Roll pub packages manually (#145170) 2024-03-15 14:12:22 +00:00
flutter_test Turning if chains into shorter switch statements (#144977) 2024-03-13 17:16:17 +00:00
flutter_tools Roll pub packages manually (#145170) 2024-03-15 14:12:22 +00:00
flutter_web_plugins Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
fuchsia_remote_debug_protocol Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
integration_test Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
analysis_options.yaml Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00