Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[ios]make the screenIfViewLoaded and windowSceneIfLoaded helpers reusable #44303

Merged

Conversation

hellohuanlin
Copy link
Contributor

@hellohuanlin hellohuanlin commented Aug 2, 2023

The existing screenIfViewLoaded and windowSceneIfLoaded functions are private helpers of FlutterViewController class. This PR moves the logic to a category of the UIViewController, so it can be reused for any UIViewControllers.

List which issues are fixed by this PR. You must list at least one issue.

#43972 (comment)

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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@mossmana mossmana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this work. It was something I considered initially, but wanted to wait and see if there would be other cases where a shared utility could be used.

Copy link
Contributor

@mossmana mossmana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hellohuanlin
Copy link
Contributor Author

It was something I considered initially, but wanted to wait and see if there would be other cases where a shared utility could be used.

@mossmana Yep, I would do the same - previously we only needed them inside FlutterViewController, so it made sense to just keep them private helpers.

Looks like there are some issues with license files update. Will fix them tomorrow.

@hellohuanlin hellohuanlin force-pushed the reusable_screen_scene_if_loaded_helper branch from 79e8723 to b2ab55c Compare August 3, 2023 15:38
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hellohuanlin hellohuanlin added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 3, 2023
@auto-submit auto-submit bot merged commit 26b9d3b into flutter:main Aug 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 3, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 3, 2023
…ions) (#131880)

Manual roll requested by jacksongardner@google.com

flutter/engine@4cc0b3d...b08e141

2023-08-03 john@johnmccutchan.com Add @keep annotations to avoid dead code elimination of classes only referenced by JNI (flutter/engine#44337)
2023-08-03 skia-flutter-autoroll@skia.org Roll Skia from bd3ee535e246 to 36072a994f11 (2 revisions) (flutter/engine#44329)
2023-08-03 skia-flutter-autoroll@skia.org Roll Dart SDK from dcd09f5726b7 to e3d2b4a190aa (1 revision) (flutter/engine#44330)
2023-08-03 30870216+gaaclarke@users.noreply.github.com [Impeller] updated validation layers documentation (flutter/engine#44328)
2023-08-03 41930132+hellohuanlin@users.noreply.github.com [ios]make the screenIfViewLoaded and windowSceneIfLoaded helpers reusable (flutter/engine#44303)
2023-08-03 skia-flutter-autoroll@skia.org Roll Skia from 768050436c0a to bd3ee535e246 (2 revisions) (flutter/engine#44327)
2023-08-03 john@johnmccutchan.com Re-Re-Land Support for rendering Android Platform Views into a HardwareBuffer backed texture (flutter/engine#44326)
2023-08-03 skia-flutter-autoroll@skia.org Roll Skia from 8a377a9545b8 to 768050436c0a (1 revision) (flutter/engine#44320)
2023-08-03 bdero@google.com [Flutter GPU] Export symbols from engine, stub for testing on CI. (flutter/engine#44280)

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 jacksongardner@google.com,rmistry@google.com,zra@google.com 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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…able (flutter#44303)

The existing `screenIfViewLoaded` and `windowSceneIfLoaded` functions are private helpers of `FlutterViewController` class. This PR moves the logic to a category of the `UIViewController`, so it can be reused for any `UIViewController`s. 

*List which issues are fixed by this PR. You must list at least one issue.*

flutter#43972 (comment)

*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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants