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

Conversation

@loic-sharma
Copy link
Member

Adds an ID to a view:

  1. FlutterWindowsView now has a ID
  2. The FlutterWindowsEngine::view(...) accessor now requires a view ID parameter

This is a refactoring with no semantic changes.

Part of flutter/flutter#143765

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 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
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

return std::chrono::nanoseconds(interval);
}

FlutterWindowsView* FlutterWindowsEngine::view(FlutterViewId view_id) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a unit test for this now to test the implicit view ID and make sure we update everything in sync when removing that assumption?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you have in mind that we need to be kept in sync? Would the test verify that the engine crashes if a non-zero ID is given?

Personally I think it'd be okay without this test. If I'm understanding you correctly, all our existing tests effectively verify this by not crashing. Please let me know if you feel strongly about this though!

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2024
@auto-submit auto-submit bot merged commit cb12a8c into flutter:main Feb 20, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants