-
Notifications
You must be signed in to change notification settings - Fork 6k
Add FlutterTaskRunnerDescription.destruction_callback #56445
Conversation
|
This is a "what do you think about this approach?" patch. There are other ways we could do this but it has the nice property that we have similar Task runner destruction happens during the |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the comment suggestion (and a preference for the bridge-based retain count management, but LGTM either way).
Adds a `destruction_callback` member to `FlutterTaskRunnerDescription` that provides embedder developers a means of performing any cleanup of resources tied to the lifetime of the task runner. In the case of the macOS embedder, the task runner holds a reference to the engine itself that is used in the `post_task_callback` and whose lifetime needs to exceed that of the task runner. This refactoring allows us to centralise all related retain count manipulation around task runner setup. This is a refactor of the lifecycle bits of #13300.
|
Talked to @chinmaygarde as well and got a verbal lgtm. |
…158398) flutter/engine@1b567e8...6b77347 2024-11-08 [email protected] Add FlutterTaskRunnerDescription.destruction_callback (flutter/engine#56445) 2024-11-08 [email protected] Roll Skia from d0ee80612f86 to 778b21720a61 (5 revisions) (flutter/engine#56457) 2024-11-08 [email protected] Manual roll Dart SDK from 50c620224f27 to cfa1826c3df1 (2 revisions) (flutter/engine#56456) 2024-11-08 [email protected] [Impeller] Switch to uniform arrays for gradient data on non-SSBO hardware (flutter/engine#56441) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…#56445) Adds a `destruction_callback` member to `FlutterTaskRunnerDescription` that provides embedder developers a means of performing any cleanup of resources tied to the lifetime of the task runner. In the case of the macOS embedder, the task runner holds a reference to the engine itself that is used in the `post_task_callback` and whose lifetime needs to match/exceed that of the task runner. This refactoring allows us to centralise all related retain count manipulation around task runner setup. This is a refactor of the lifecycle bits of flutter/engine#13300. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Adds a
destruction_callbackmember toFlutterTaskRunnerDescriptionthat provides embedder developers a means of performing any cleanup of resources tied to the lifetime of the task runner.In the case of the macOS embedder, the task runner holds a reference to the engine itself that is used in the
post_task_callbackand whose lifetime needs to match/exceed that of the task runner. This refactoring allows us to centralise all related retain count manipulation around task runner setup.This is a refactor of the lifecycle bits of #13300.
Issue: flutter/flutter#137801
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.