This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Don't re-initialize the default RenderSurface when returning from hybrid composition mode #47358
Merged
auto-submit
merged 1 commit into
flutter:main
from
johnmccutchan:fix_exit_hybrid_composition
Oct 27, 2023
Merged
Don't re-initialize the default RenderSurface when returning from hybrid composition mode #47358
auto-submit
merged 1 commit into
flutter:main
from
johnmccutchan:fix_exit_hybrid_composition
Oct 27, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
jason-simmons
approved these changes
Oct 26, 2023
…rid composition mode When we enter hybrid composition mode we 'pause' the default RenderSurface (implemented by SurfaceView or TextureView) and swap to an ImageReader based RenderSurface. When we return from hybrid composition mode we recreate and re-initialize the real RenderSurface as if it was being used for the first time. This broke Platform Views in an internal app b/306122497 because we would incorrectly tell the texture to attach when it was never detached. This CL changes the protocol so that when we return from hybrid composition mode we only swap the RenderSurface and do not re-create it. This avoids doing a bunch of unnecessary work and fixes the logic error of re-attaching textures that were never detached.
Contributor
Author
|
Added tests as well. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
fluttermirroringbot
pushed a commit
to flutter/flutter
that referenced
this pull request
Oct 27, 2023
…sions) (#137422) Manual roll requested by [email protected] flutter/engine@bedc49e...71e1a04 2023-10-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Manual roll Dart SDK from 360370ff93b0 to 18678a3eddb7 (9 revisions)" (flutter/engine#47380) 2023-10-27 [email protected] Roll Skia from 0122c0e18d26 to fe9959acc5e0 (1 revision) (flutter/engine#47379) 2023-10-27 [email protected] Roll Fuchsia Mac SDK from 1ngqKBnmTtmFM6aBD... to fw9lcUvz8S07_zaAj... (flutter/engine#47377) 2023-10-27 [email protected] Roll Fuchsia Linux SDK from 37VxdxlPfdkek7mwC... to gPQSfYJVLOgXjxQce... (flutter/engine#47375) 2023-10-27 [email protected] Roll Skia from 22f5419438c4 to 0122c0e18d26 (1 revision) (flutter/engine#47373) 2023-10-27 [email protected] Roll Skia from 5262cbff56b1 to 22f5419438c4 (1 revision) (flutter/engine#47372) 2023-10-27 [email protected] Roll Skia from fe61b3467547 to 5262cbff56b1 (1 revision) (flutter/engine#47371) 2023-10-27 [email protected] Roll Skia from fbdd7d97b26e to fe61b3467547 (1 revision) (flutter/engine#47370) 2023-10-27 [email protected] Roll Skia from 2246f3473053 to fbdd7d97b26e (2 revisions) (flutter/engine#47369) 2023-10-27 [email protected] Roll Skia from ec4c6b3a6690 to 2246f3473053 (1 revision) (flutter/engine#47366) 2023-10-27 [email protected] [Impeller] Add FilterContents::GetSourceCoverage to enable filtered saveLayer clipping. (flutter/engine#47183) 2023-10-27 [email protected] Roll Skia from bc8ca57868d2 to ec4c6b3a6690 (1 revision) (flutter/engine#47365) 2023-10-27 [email protected] Don't re-initialize the default RenderSurface when returning from hybrid composition mode (flutter/engine#47358) 2023-10-27 [email protected] Manual roll Dart SDK from 360370ff93b0 to 18678a3eddb7 (9 revisions) (flutter/engine#47357) 2023-10-26 [email protected] Roll Skia from 93a0ad4d7ca6 to bc8ca57868d2 (2 revisions) (flutter/engine#47359) 2023-10-26 [email protected] Roll Fuchsia Mac SDK from YSn00b0Trsu2vdhIq... to 1ngqKBnmTtmFM6aBD... (flutter/engine#47363) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 37VxdxlPfdke to gPQSfYJVLOgX fuchsia/sdk/core/mac-amd64 from YSn00b0Trsu2 to fw9lcUvz8S07 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],[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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 27, 2023
…g from hybrid composition mode (flutter/engine#47358)
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Oct 27, 2023
…137429) flutter/engine@bedc49e...a198ad4 2023-10-27 [email protected] [Impeller] Add present wait latch. (flutter/engine#47311) 2023-10-27 [email protected] Move rapidjson to flutter/third_party (flutter/engine#47354) 2023-10-27 [email protected] [Impeller] Enable GLES MSAA only if the multisampled_render_to_texture2 extension is available (flutter/engine#47364) 2023-10-27 [email protected] [Impeller] Fix leak of framebuffers used in GLES MSAA rendering (flutter/engine#47362) 2023-10-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Manual roll Dart SDK from 360370ff93b0 to 18678a3eddb7 (9 revisions)" (flutter/engine#47380) 2023-10-27 [email protected] Roll Skia from 0122c0e18d26 to fe9959acc5e0 (1 revision) (flutter/engine#47379) 2023-10-27 [email protected] Roll Fuchsia Mac SDK from 1ngqKBnmTtmFM6aBD... to fw9lcUvz8S07_zaAj... (flutter/engine#47377) 2023-10-27 [email protected] Roll Fuchsia Linux SDK from 37VxdxlPfdkek7mwC... to gPQSfYJVLOgXjxQce... (flutter/engine#47375) 2023-10-27 [email protected] Roll Skia from 22f5419438c4 to 0122c0e18d26 (1 revision) (flutter/engine#47373) 2023-10-27 [email protected] Roll Skia from 5262cbff56b1 to 22f5419438c4 (1 revision) (flutter/engine#47372) 2023-10-27 [email protected] Roll Skia from fe61b3467547 to 5262cbff56b1 (1 revision) (flutter/engine#47371) 2023-10-27 [email protected] Roll Skia from fbdd7d97b26e to fe61b3467547 (1 revision) (flutter/engine#47370) 2023-10-27 [email protected] Roll Skia from 2246f3473053 to fbdd7d97b26e (2 revisions) (flutter/engine#47369) 2023-10-27 [email protected] Roll Skia from ec4c6b3a6690 to 2246f3473053 (1 revision) (flutter/engine#47366) 2023-10-27 [email protected] [Impeller] Add FilterContents::GetSourceCoverage to enable filtered saveLayer clipping. (flutter/engine#47183) 2023-10-27 [email protected] Roll Skia from bc8ca57868d2 to ec4c6b3a6690 (1 revision) (flutter/engine#47365) 2023-10-27 [email protected] Don't re-initialize the default RenderSurface when returning from hybrid composition mode (flutter/engine#47358) 2023-10-27 [email protected] Manual roll Dart SDK from 360370ff93b0 to 18678a3eddb7 (9 revisions) (flutter/engine#47357) 2023-10-26 [email protected] Roll Skia from 93a0ad4d7ca6 to bc8ca57868d2 (2 revisions) (flutter/engine#47359) 2023-10-26 [email protected] Roll Fuchsia Mac SDK from YSn00b0Trsu2vdhIq... to 1ngqKBnmTtmFM6aBD... (flutter/engine#47363) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 37VxdxlPfdke to gPQSfYJVLOgX fuchsia/sdk/core/mac-amd64 from YSn00b0Trsu2 to fw9lcUvz8S07 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],[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
2 tasks
SKKbySSK
pushed a commit
to SKKbySSK/engine
that referenced
this pull request
Jan 16, 2024
…rid composition mode (flutter#47358) When we enter hybrid composition mode we 'pause' the default RenderSurface (implemented by SurfaceView or TextureView) and swap to an ImageReader based RenderSurface. When we return from hybrid composition mode we recreate and re-initialize the real RenderSurface as if it was being used for the first time. This broke Platform Views in an internal app b/306122497 because we would incorrectly tell the texture to attach when it was never detached. This CL changes the protocol so that when we return from hybrid composition mode we only swap the RenderSurface and do not re-create it. This avoids doing a bunch of unnecessary work and fixes the logic error of re-attaching textures that were never detached. *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
manu-sncf
added a commit
to sncf-connect-tech/engine
that referenced
this pull request
Feb 8, 2024
…ing from hybrid composition mode (flutter#47358)
8 tasks
8 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Mar 22, 2024
…narios (#50947) Consider this scenario: In an add-to-app context, where multiple Flutter activities share the same engine, a situation occurs. When navigating from FlutterActivity1 to FlutterActivity2, the Flutter view associated with FlutterActivity1 is detached from the engine. Then, the Flutter view of FlutterActivity2 is attached. Upon navigating back to FlutterActivity1, its Flutter view is re-attached to the shared engine. The expected behavior is: When a Flutter view detaches from the shared engine, the associated surface should be released. When the Flutter view re-attaches, a new surface should be created. After #47358, no new surface is created when the Flutter view is attached again. This results in the Flutter view having no underlying surface, which causes the page to appear blank or freeze without responding. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
mdnht
pushed a commit
to mdnht/engine
that referenced
this pull request
Apr 25, 2024
…narios (flutter#50947) Consider this scenario: In an add-to-app context, where multiple Flutter activities share the same engine, a situation occurs. When navigating from FlutterActivity1 to FlutterActivity2, the Flutter view associated with FlutterActivity1 is detached from the engine. Then, the Flutter view of FlutterActivity2 is attached. Upon navigating back to FlutterActivity1, its Flutter view is re-attached to the shared engine. The expected behavior is: When a Flutter view detaches from the shared engine, the associated surface should be released. When the Flutter view re-attaches, a new surface should be created. After flutter#47358, no new surface is created when the Flutter view is attached again. This results in the Flutter view having no underlying surface, which causes the page to appear blank or freeze without responding. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we enter hybrid composition mode we 'pause' the default RenderSurface (implemented by SurfaceView or TextureView) and swap to an ImageReader based RenderSurface.
When we return from hybrid composition mode we recreate and re-initialize the real RenderSurface as if it was being used for the first time.
This broke Platform Views in an internal app b/306122497 because we would incorrectly tell the texture to attach when it was never detached.
This CL changes the protocol so that when we return from hybrid composition mode we only swap the RenderSurface and do not re-create it. This avoids doing a bunch of unnecessary work and fixes the logic error of re-attaching textures that were never detached.
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.