-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland: Migration to PlatformDispatcher and multi-window #21932
Conversation
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
c8b0a4b
to
7bd1d10
Compare
7bd1d10
to
7a688e5
Compare
@gspencergoog Looks like this conflicted pretty heavily with #21572, if you have any advice on how to merge that PR in it would be much appreciated. (Not critical, I'll look at it on Monday and try to figure it out.) |
@Hixie Yes, I can help you out with that: it's pretty hairy, I agree. Mostly the bodies of the functions moved to static functions on PlatformDispatcher, and the platform message dispatch mechanism moved there too (because that's a main point of the class). They mostly weren't changed, just moved. I'll see if I can try a merge today and send you a diff to apply. |
* 000bf4b Roll Skia from 2d2f82c00aeb to 5c7bb326a7b3 (33 revisions) (flutter/engine#22059) * ae92dbf Roll Fuchsia Linux SDK from lPMs_KwnU... to gqS_DIjN4... (flutter/engine#22057) * 92cd74e Roll Fuchsia Mac SDK from pZ9FgVZTK... to WLxBkBnZa... (flutter/engine#22055) * e51c710 Roll Dart SDK from a3d902d8598e to 9f907e198970 (2 revisions) (flutter/engine#22058) * 326b202 Reland fuchsia external view embedder will be shared with platform view (flutter/engine#22008) * a9a9a2f Roll Skia from 5c7bb326a7b3 to 65674e4c2e56 (3 revisions) (flutter/engine#22060) * 1233fe4 Revert "Revert "Explicitly make the X connection for EGL. (#21831)" (#21851)" (flutter/engine#21871) * aed8e01 Fixes Edge trigger route change announcement (flutter/engine#21975) * 6bc70e4 Reland: Migration to PlatformDispatcher and multi-window (flutter/engine#21932) * 5ca5e26 Add FlEventChannel (flutter/engine#21316) * 77b0052 Roll Skia from 65674e4c2e56 to 01b05e5b830b (3 revisions) (flutter/engine#22062) * 3d27fd5 Support loading assets from Android dynamic feature modules (flutter/engine#21504) * 742dfbe support uri intent launcher in android (flutter/engine#21275) * cde1e3f Auto detect mode to determine which rendering backend to use. (flutter/engine#21852) * 329ccf7 Roll Skia from 01b05e5b830b to 53281c712159 (1 revision) (flutter/engine#22065) * cde78c1 Add a golden scenario test for fallback font rendering on iOS take 2 (flutter/engine#22033) * 4f4599b Roll Dart SDK from 9f907e198970 to 37ccceacad41 (3 revisions) (flutter/engine#22069) * f0b10c5 [web] Prevent using DOM nodes for canvas with large number of draws (flutter/engine#22064) * a86ba57 Roll Fuchsia Mac SDK from WLxBkBnZa... to zDfaxkqlv... (flutter/engine#22073) * 645198a Roll Fuchsia Linux SDK from gqS_DIjN4... to vuKxZmSVj... (flutter/engine#22074) * 0b26570 Revert dart rolls (flutter/engine#22078)
Does this mean we will get multiple windows in flutter rather soon-ish? |
@IvanVishnevskiy It's going to be a while. There is still a lot of work left to do, both in the engine and the framework. |
This re-lands flutter#20496 and flutter#21780 after fixing the semantics-enabling code that was causing the post-submit web_smoke_test to fail. Below is the description from the original PR: This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window. The design doc for this change is here. The major changes in this PR: Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class. Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton). Next step after this PR lands: Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first. The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
Description
This re-lands #20496 and #21780 after fixing the semantics-enabling code that was causing the post-submit
web_smoke_test
to fail.Below is the description from the original PR:
This is a PR for converting the
dart:ui
code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the newPlatformDispatcher
class to talk directly to thePlatformConfiguration
class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.The design doc for this change is here.
The major changes in this PR:
Window
, and into the newPlatformDispatcher
class that holds all of the platform state, so that the platform code need only update the configuration on this class.FlutterView
,FlutterWindow
, andSingletonFlutterWindow
classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the formerWindow
class, and will eventually be the type of thewindow
singleton).Next step after this PR lands:
Remove the
Window
class entirely (it is replaced bySingletonFlutterWindow
). Some minor changes in the Framework are needed to switch to usingSingletonFlutterWindow
directly first.The
Window
class still exists in this PR, but will be removed as soon as the framework is converted to point to theSingletonFlutterWindow
class instead. They share the same API, just have different names (Window
is currently a subclass ofSingletonFlutterWindow
). The intention is that theWindow
name will be freed up to use as a widget class name in the framework for managing windows. The singleton calledwindow
will remain, and keep the same API it has now.Related Issues
Tests
Breaking Change