engine icon indicating copy to clipboard operation
engine copied to clipboard

[Multiwindow] Isolate renderer from view

Open dkwingsmt opened this issue 3 years ago • 0 comments

This PR changes FlutterRenderer so that it can no longer be set a view, but instead the methods receive a view as an argument.

Part of the multiwindow project (design doc): The renderer no longer corresponds to a single view, but can be used to render all the views that the engine can own.

Alternative option: Change the renderer's setFlutterView: into addFlutterView:id:, and the methods receive a view ID as an argument. I didn't choose this one because the methods will receive an additional argument anyway, and in this design the renderer needs to maintain a map that is isomorphic to the engine's view controller map. Moreover, receiving the view on the spot makes the renderer class even closer to a pure strategic class.

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.

dkwingsmt avatar Oct 04 '22 17:10 dkwingsmt